Archived topic
Post navigation with clickable thumbnails
21 replies · Started by qpaq on November 7, 2020
Can you first confirm that the post navigation option is activated in the customizer?
https://docs.generatepress.com/article/blog-content-layout/#single
If so then you will need to dig further into the problematic install as the solution works in a fresh install for both of us so it's unlikely a theme issue here.
I would recommend disabling all plugins and all custom functions to test.
Hi Leo and David,
I've managed to work the recent code and CSS. Thanks very much. The culprit was the attributed categories; the posts on the test site did not have the same category. So obviously, the post-nav section was disappearing. Sorry for the trouble.
So everything works almost perfectly now except I couldn't disable the caption texts of featured images. I don't need them here, is there a way to get rid of captions in post-nav section?
I made them disappear with this but their allocated area still takes up the space underneath the thumbnail.
.wp-caption-text{
display: none;
}
The Next thumbnail also does not take its hyperlink where else the previous thumbnail is linked to the previous post. How do we sort it out?
And how can I add the current category name over this section to let users they are browsing in the current category?
Edit this CSS rule to include the z-index property i have commented below:
#nav-below a::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1; /* Add this property */
}
You can add your Category terms back to the Post Meta. I assume you have used a filter to only display the tags below the content ?
Thanks David, that CSS chunk solved the Next thumbnail hyperlink problem.
How do we get rid of captions allocating space in the post-nav section, I don't need captions to appear here?
Try this CSS:
#nav-below .wp-caption {
margin-bottom: 0;
}
#nav-below .wp-caption .wp-caption-text {
display: none;
}
Great, thanks David.
You're welcome