Hi, I generally had disabled Previous/Next post options for whole my Newspaper web, but on specific category I want to have such option – to allow visitors to continue reading story from one post to another one.
I guess there is no way how to set up such behavior via Newspaper theme panel so I have created Cloud Template Type “single” for these posts and in this template I added element “Single Post Next Prev“. BUT there is almost no customization options for element, only Color and CSS. And of course on post page it works the wrong way – it shows next/prev posts regardless category.
So my question is: how can I setup Previous/Next post feature in the same Category? I would accept even necessity of Child theme where will be modification for function get_previous_post $in_same_term = false=>true, but I don’t know, how exactly element “Single Post Next Prev“ uses this basic WP function and what precisely should be in functions.php
Hello !
That is because you have more than 1 categories assigned on your posts. If your posts has will be assigned to only 1 category then it will automatically be shown only on the specified category and you will see your posts from only that category.
Thank you !
No, of course I’m talking about posts/articles assigned to only one category. And problem is not Category listing, but feature Next/Previous posts on Post view.
In your theme you could turn it on for whole web (Newspaper / Theme panel / Post settings / SHOW NEXT AND PREVIOUS POSTS – Show or hide next and previous posts (bottom of single post pages)
or put this element manually into Cloud Post Template (Add / Single Post shortcodes / Single Post Next Prev)
But in either case there are no setting options. And apparently your Theme uses default WP value, which is “same_category=false”, that means your theme will show Next/Prev posts just in date order, jumping from one category to another.
And my question is how to override such behaviour? Usually in profi templates is there always way through child theme functions.php, where you have to change same_category to true. But I don’t know how to do it in Newspaper theme – it depends on the code your programmers used.
Hello !
Unfortunately this option is not implemented in Newspaper Theme at the moment, Our developers are working in implementing this feature in the future.
As a quick fix you can edit this 2 files in order to have it:
https://prnt.sc/q2ob1y ; https://prnt.sc/q2obj0
I hope this was helpful !
Thank you !
Thank you, that works! For possible followers – it needs only to change it into syntax with single quotes (‘in_same_term:true’)
I have 2 additional questions:
1) Is there a way how to implement these 2 parameters through functions.php in child theme, that means without repeating that procedure manually after every Template/Plugin update ?
2) What is roughly the time estimate when it will be implemented in the template – just to know, if eventual procedure with manual change of code after updates is for short time only or longer term necessity
Hello !
1. You can insert functions php in child theme: Find out how to set it up here: https://forum.tagdiv.com/the-child-theme-support-tutorial/
2. We cannot say for sure. Our developers are working full throttle on implementing and adjusting a lot of options so we don’t have an time zone yet.
Thank you !