Support » Theme: FlyMag » Paging Navigation

  • Hello everyone,

    I will try to explain in English, but this is not my language, so please, be kind

    I want the buttons previous/next posts(in the bottom of a post) applies only to post of the same category.

    I think i should to add something on inc/template-tags.php, but i don’t know what.

    Can you help me?

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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:

    if( is_category( 'category-slug' ) ) {

    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:

    if( is_category( ‘1’ ) ) {

    if( is_category( ‘2’ ) ) {

    Cause, i think i have to do that for all my categories no?
    But it don’t works

    You can see it here

    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”

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Paging Navigation’ is closed to new replies.