wrzuc w miejsce gdzie chcesz wyswietlac nawigację obrazkową poniższy kod, oczywiście musisz sobie ostylować
<?php
$postlist = get_posts( 'orderby=menu_order&sort_order=asc' );
$posts = array();
foreach ( $postlist as $post ) {
$posts[] += $post->ID;
}
$current = array_search( get_the_ID(), $posts );
$prevID = $posts[$current-1];
$nextID = $posts[$current+1];
$prevsecondID = $posts[$current-2];
$nextsecondID = $posts[$current+2];
$prevthridID = $posts[$current-3];
$nextthridID = $posts[$current+3];
?>
<div>
<div class="alignleft">
<?php
if ( !empty( $prevthridID ) ): ?>
<a>"
title="<?php echo get_the_title( $prevthridID ); ?>">
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail(array(100,100));
} ?>
</a>
<?php endif;
if ( !empty( $prevsecondID ) ): ?>
<a>"
title="<?php echo get_the_title( $prevsecondID ); ?>">
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail(array(100,100));
} ?>
</a>
<?php endif;
if ( !empty( $prevID ) ): ?>
<a>"
title="<?php echo get_the_title( $prevID ); ?>">
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail(array(100,100));
} ?>
</a>
<?php endif ?>
</div>
<div class="alignright">
<?php
if ( !empty( $nextID ) ): ?>
<a>"
title="<?php echo get_the_title( $nextID ); ?>">
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail(array(100,100));
} ?>
</a>
<?php endif;
if ( !empty( $nextsecondID ) ): ?>
<a>"
title="<?php echo get_the_title( $nextsecondID ); ?>">
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail(array(100,100));
} ?>
</a>
<?php endif;
if ( !empty( $nextsecondID ) ): ?>
<a>"
title="<?php echo get_the_title( $nextthridID ); ?>">
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail(array(100,100));
} ?>
</a>
<?php endif; ?>
</div>
</div>
Twórca wątku
blaku
(@blaku)
Działa! Wielkie dzięki! 🙂