Hi Ultragraphik,
You need a child theme to do this because you’re going to modify a template file and certainly don’t want to lose all your mods after a theme update.
Copy index.php from the parent into the child theme. Next, open your child theme index.php file and find this line of code:
<?php flymag_paging_nav(); ?>
Change the snippet above into this:
<?php
if( is_category( 'category-slug' ) ) {
flymag_paging_nav();
}
?>
Replace category-slug with the slug of your chosen category and you should be good to go.
I hope this helps 🙂
– Maria Antonietta
Thank Maria, i try but it don’t works.
I did:
<?php
if( is_category( ‘1’ ) ) {
flymag_paging_nav();
}
?>
<?php
if( is_category( ‘2’ ) ) {
flymag_paging_nav();
}
?>
Cause, i think i have to do that for all my categories no?
But it don’t works
You can see it here
http://ultragraphik.com/cec/2016/04/17/consultant-en-transactions-fonds-de-commerce/
This post is in category “CV”
The older post on the left is in category “CV” too,
The right one is in category “actu”
:/
Thanks for the help
I’ll try to replicate the problem tomorrow on my computer.
Sorry, I got the wrong file. You need to copy single.php into your child theme, find the same line of code (<?php flymag_post_nav(); ?>) and make the modification.
The result should be that if you’re viewing a single post in your chosen category you see the next and previous post link, if you’re on any other category you don’t. Is this what you’re aiming for?
Thanx Maria,
Not exctly. I want:
If i am in the category “1”, i see the previous/next post in category “1”
If i am in the category “2”, i see the previous/next post in category “2”
Etc…