2012-08-30, 21:59:43
I have a special page which has two fields: "first" and "second". It also has a tag "_special_myspecial".
I used a search function to find all myspecial pages and can't figure out how to get the special fields.
This is not working, i.e. $first and $second are empty.
There is also function return_special_field($name, $default='') but I don't know how to call it in the context of each search result row above.
I used a search function to find all myspecial pages and can't figure out how to get the special fields.
Code:
<?php
$results = return_i18n_search_results(array('_special_myspecial'));
foreach ($results['results'] as $entry) {
$first = $entry->data['first'];
$second = $entry->data['second'];
?>
This is not working, i.e. $first and $second are empty.
There is also function return_special_field($name, $default='') but I don't know how to call it in the context of each search result row above.