2023-10-20, 16:40:56
Menus fixed. Now I have another issue with special pages created using I18N Special Page Fields plugin. The following code does not retrieve the data saved with the latter plugin. It can retrieve data from custom fields though. Does anyone know what needs to be modified so it retrieves values of Special Page Fields?
<?php /* get the pages and sort them */
global $pagesArray;
$pagesSorted = subval_sort($pagesArray,'menuOrder'); // or 'title', 'menu', 'url', ...
$thisPage = return_page_slug();
$currentSlug='_parent_'.$thisPage;
global $language;
$result = return_i18n_search_results($currentSlug,null,0,99,'+menuOrder',$language);
foreach ($result['results'] as $item) { ?>
<?php echo $item->specialpagefield; ?> //does not work with SPF
<?php echo $item->custom_field; ?> //works with CF
<?php } ?>
<?php /* get the pages and sort them */
global $pagesArray;
$pagesSorted = subval_sort($pagesArray,'menuOrder'); // or 'title', 'menu', 'url', ...
$thisPage = return_page_slug();
$currentSlug='_parent_'.$thisPage;
global $language;
$result = return_i18n_search_results($currentSlug,null,0,99,'+menuOrder',$language);
foreach ($result['results'] as $item) { ?>
<?php echo $item->specialpagefield; ?> //does not work with SPF
<?php echo $item->custom_field; ?> //works with CF
<?php } ?>