ThemeShaper Forums » Thematic

[closed]

Gallery theme: next_page and previous_page links to posts in the same category

(5 posts)
  • Started 13 years ago by timmalley
  • Latest reply from snack
  • This topic is resolved
  1. timmalley
    Member

    Hi,

    I am trying to get my portfolio website up and running and I'd love for each individual post page to give links to the next and the previous posts in the same category, as opposed to next and previous posts overall.

    I am using the Gallery theme, and here's the code that the theme uses:
    <?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'thematic')) ?>
    and
    <?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'thematic')) ?>

    I know how to do this in Wordpress, but Gallery seems a little bit too tricky.
    Any help would be appreciated!
    Thanks,
    Tim

    Posted 13 years ago #
  2. icedangl007
    Member

    I would also like to do this, any suggestions?

    Posted 13 years ago #
  3. Hi,

    the Codex helps with http://codex.wordpress.org/Template_Tags/previous_post_link

    Chris

    Posted 13 years ago #
  4. I used the "Smarter Navigation" plugin for this and worked perfect

    Posted 12 years ago #
  5. snack
    Member

    @Chris, personally I like the idea of doing it in code -- so lightweight and to-the-point. I'm using Thematic, however, and I don't have direct access to the next_ & previous_post_link() functions. I can override them with childtheme_override_previous_post_link(), but I feel strange completely overriding everything that I want to modify.

    Is there a way I can just pass a value to this?

    previous_post_link($args['in_same_cat'])

    (That's in thematic/library/extensions/content-extensions.php for anyone who's following along.)

    It kinda looks like it's been written with that in mind, but I can't quite parse it...

    Thanks.

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.