WordPress.org

Ready to get started?Download WordPress

Forums

"Special" Category (6 posts)

  1. marky
    Member
    Posted 10 years ago #

    Is it possible to create a special category that is not included on any index and can only be accessed through it's archive URL?

  2. Mark (podz)
    Support Maven
    Posted 10 years ago #

    Very probably, but Google will find it anyway ...

  3. marky
    Member
    Posted 10 years ago #

    I don't care if Google finds it; in fact, I plan on manually linking these pages on my site. :-)
    The reason I don't want them indexed on the front page or in the archives is because they're going to be used as "content" pages. For example, my about page, etc. By managing it with WP I can enable comments and trackbacks, etc. But right now I can't seem to prevent a category from appearing on the front page and archives.

  4. Mark (podz)
    Support Maven
    Posted 10 years ago #

  5. Nick Momrik
    Member
    Posted 10 years ago #

    Are you using the latest nightly? If so there is a new function that could be used to do exactly what you want.
    Off the top of my head you could do this...
    In "the loop" after this line
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    put
    <?php if ($single || !in_category(999)) { ?>
    and then before this line
    <?php endforeach; else: ?>
    put
    <?php } ?>

  6. Nick Momrik
    Member
    Posted 10 years ago #

    Oh...and replace the 999 with whatever category # is for your "special category".

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.