Archived topic
right above the sitebar 2 images made with NEXT and PREVIOUS
48 replies · Started by diedrich on November 23, 2020
hello,
I have a question, in my time at Elegant Themes (switched to you 3 weeks ago) I had the theme Extra, they have it for me (e.g. https://www.davidbowieworld.nl/mijn-bootlegs-2-2/tour-recordings/1972-1973-the-ziggy-stardust-tour/attachment/david-bowie-live-1972-front/#main) on my attachment pages right above the sitebar 2 images made with NEXT and PREVIOUS so that the to the next or previous attachmend page, is it possible you can create this too or is this going to be very difficult now, I would be very happy
greeting Diedrich
Hi there,
Would the post navigation option in the customizer work for you?
https://docs.generatepress.com/article/blog-content-layout/#single
hey Leo, that's not going to work, this is an attachment page and not a post
Something like this might work:
https://generatepress.com/forums/topic/previous-next-post-but-for-attachment-pages/
hello, thanks for your help but this is not working .
can you help me
greeting Diedrich
What exactly isn't working? Did anything get added at all?
It was working for another user.
Hi Leo ,
nothing is added at all, I don't see anything changing
Diedrich
Can you please clear and disable WP Rocket first?
Please always do that when we are helping.
I always do this Leo, sorry it doesn't work
Is the plugin disabled?
I'm still seeing WP Rocket activated in the source code.
Maybe you have another caching plugin or server caching?
the cache WP ROCKET is now completely disabled, but I don't see anything yet
i have try it again and i see nothing Leo
Question - How are you creating those attachment pages?
go to PAGE
go to ADD NEW
go to AD MEDIA
go to CREATE GALLERY
Select the images you want to have
Sorry I found a mistake in David's code.
Can you try this instead?
<?php
if ( is_attachment() ) {?>
<div class="attach-navigation">
<span class="prev"><?php previous_image_link( 'thumbnail' );?></span>
<span class="next"><?php next_image_link( 'thumbnail' );?></span>
</div>
<?php
}
?>