Support » Theme: Hatch » [Theme: Hatch] exclude post category in loop-nav

  • i’m using hatch theme, using categories for portfolio posts and for news posts. i’ve installed the plugin Ultimate Category Excluder, so i can have different pages showing separate categories, which is working great.

    The problem is when i get into the post pages, the loop-nav navigation is still pulling from all posts categories, so when you look a portfolio post, the next link page might be a news event with a really long post title. i want to have it pull from only the category the post exists in.

    It looks like i can edit the loop-nav.php to restrict, but i don’t enough coding. Here is an excerpt from the php file:

    <div class=”loop-nav”>
    <?php previous_post_link( ‘%link’, ‘<span class=”previous”>’ . __( ‘← Return to entry’, ‘hatch’ ) . ‘</span>’ ); ?>
    </div><!– .loop-nav –>

    <?php elseif ( is_singular( ‘post’ ) ) : ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • thanks for posting ankush, but that doesn’t solve the problem of isolating post categories from the navigation loop. when in a post, the back and forward arrows are pulling from all categories.

    i need the navigation loop to only pull from categories the post in which the posts are included.

    you can get the desired individual posts on frong blog page as you like. Just check the mark to exclude directly from Posts section.



    I don’t understand the solution. Ankush, what checkbox where?

    In detail, what he was refering to was for you to.

    Click Posts from Dashboard.
    Click on the specified Post you wish to have seen on your Front Page // and it will be the only ones added to loop-nav.
    Then go to the right side inside Publishing options:
    And check the box stating: Stick This Post to The Front Page.

    Hatch is a great theme!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Theme: Hatch] exclude post category in loop-nav’ is closed to new replies.