Support » Themes and Templates » Category based navigation > monolit theme with YAPB

  • Resolved Pablo_MU


    Dear all,

    I’m currently asking for your kind help to help me go through the particular situation I’m in 🙂

    Headlines: I was doing a wp photoblog site for a friend and I just realized that we need a category based navigation instead of date based navigation.

    WP: 3.1.2
    Theme: Monolit
    Plugins: Multi-level Navigation Plugin & Yet Another PhotoBlog

    Details: We have two buttons named “previous” and “next”. Thing is, they follow an order by date and we need in fact a category order, meaning users can’t leave the category without clicking in the desired category.

    Problem: I should understood this need since the beginning but I just realized that we don’t have ‘tons’ of material (photos) to ‘go through them in a timeline’.
    I’m not a php developer (shame on me) and I can’t find in forums/site some threads or articles that could eventually lead to the solution to my problem.

    Other than that I love you community 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • Totally WHOA! 😀

    I found it! Codex I love ya!

    The function is:

    Reference/get next post
    Description: Retrieve next post that is adjacent to current post.
    Usage: <?php get_next_post( $in_same_cat, $excluded_categories ) ?>
    (boolean) (optional) Whether post should be in same category.
    Default: false
    (string) (optional) Excluded categories IDs.
    Default: ”

    Soooooooooooooooo As get_next_post() is located in wp-includes/link-template.php I opened and at line 1084 and changed $in_same_cat = true to $in_same_cat = false The thing looks now like:

    function get_next_post($in_same_cat = true, $excluded_categories = '') {
    	return get_adjacent_post($in_same_cat, $excluded_categories, false);

    OMG I’m so proud of me ;o)


    I meant:

    opened and at line 1084 and changed $in_same_cat = false to $in_same_cat = true

    false to true

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Category based navigation > monolit theme with YAPB’ is closed to new replies.