2020-01-22, 05:09:40
Good afternoon!
Not strong in php, could not find the answer.
There is a pagination code:
And there is a field from i18n Special Pages. It displays a link to an image
Field created with type picture or link.
How can I get a picture from the next or last post?
This is a preview. I don’t understand.
How can this be realized?
Not strong in php, could not find the answer.
There is a pagination code:
Code:
<?php
$slug = (string) return_page_slug();
$bc = return_i18n_breadcrumbs($slug);
$level = count($bc) - 1;
$nav = return_i18n_menu_data($slug,$level,$level,I18N_SHOW_PAGES);
$i = 0;
while ($i < count($nav) && $nav[$i]['url'] != $slug) $i++;
if ($i > 0) {
echo '<a href="'.find_i18n_url($nav[$i-1]['url'],$nav[$i-1]['parent']).
'"><< '.$nav[$i-1]['title'].'</a> ';
}
if ($i+1 < count($nav)) {
echo '<a href="'.find_i18n_url($nav[$i+1]['url'],$nav[$i+1]['parent']).
'">'.$nav[$i+1]['title'].' >></a>';
}
?>
Code:
<?php get_special_field('images','-',false); ?>
How can I get a picture from the next or last post?
This is a preview. I don’t understand.
How can this be realized?