WordPress.org

Ready to get started?Download WordPress

Forums

Excluding a category isn't working for previous_post_link (1 post)

  1. darbielee
    Member
    Posted 1 year ago #

    I've seen this similar post, but I can't seem to get even the official WP way to work. The code I'm using:
    <?php previous_post_link('%link', '%title', FALSE, '7') ?>

    A working example lives here. The post "logo-[whatever]" is in category id 7. This particular category (with titles all structured that way, for reference) is used for non-blog content that gets pulled dynamically elsewhere in the site, and should never be seen as part of the blog. Why is it still showing up? I could understand if maybe I'd screwed something up trying to edit core files like that other topic suggested, but this is exactly the way WP says it's supposed to work. (This also applies to next_post_link, which is structured identically.)

    I coded this theme myself, so I'm comfortable editing any files necessary. Also, I sometimes overlook really stupid mistakes, so please point it out if that's the case.

Topic Closed

This topic has been closed to new replies.

About this Topic