Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
searching for custom field (i18n_search)
#3
(2013-02-07, 03:03:21)mvlcek Wrote: You cannot search for a specific value in a custom field.

Thx.

I'm doing it now this way: define a custom field "listthis" as dropdown with the possible values "yes" and "no". In edit.php change the line
Code:
echo '<option'.$attrs.'>'.$option.'</option>';
into
Code:
echo '<option'.$attrs.' value="secret_'.$option.'">'.$option.'</option>';>'.$option.'</option>';
and in the template search for
Code:
<?php get_i18n_search_results(array('words'=>'secret_yes','order'=>'date', ... ?>
Now all and only the pages are listed which have the custom field "listthis" containing the value "yes". It seems to work and I can't see any drawbacks. Do you?
Reply


Messages In This Thread
RE: searching for custom field (i18n_search) - by Alexander_ - 2013-02-07, 03:50:38



Users browsing this thread: 1 Guest(s)