WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] need category listed separately in archive (6 posts)

  1. l2parent
    Member
    Posted 7 years ago #

    site: http://www.l2parent.com

    i have created the index page to list all posts but category 7 (the comic page). i have created the comic page to list only one post at a time. the reason i have done this is because i want the two types of posts to be independent from one another on separate pages via my nav bar. however, now that i have created only one post on the comic page, i have no way of getting to the previous entries.... because the index page (archive page) excludes that category.

    is there a way to get the comics listed on the archive page ? i'm using the SRG Clean Archives plugin.

  2. moshu
    Member
    Posted 7 years ago #

    because the index page (archive page) excludes that category

    Hmm... Questions.
    How did you exclude your comics category from index? I mean what method?
    Do you have an archive.php template file? That should prevent your blog to use the index.php file to display "archives"... learn! > http://codex.wordpress.org/Template_Hierarchy

  3. l2parent
    Member
    Posted 7 years ago #

    i used:
    <?php if (in_category('7')) continue; ?>

    to exclude cat7 from the index page. and i have an archives.php page. i couldn't figure out how to create an archive and went to http://db.rambleschmack.net/blog/2005/06/28/how-to-make-a-wordpress-archives-page/
    and followed *most* of those instructions. i didn't have 'page options' so i went to the codex and followed the rest of the create-a-page/template instructions.

  4. l2parent
    Member
    Posted 7 years ago #

    anyone else have any ideas?

  5. moshu
    Member
    Posted 7 years ago #

    Yes. I little bit more attention when you read the replies to your question :)

    archive.php and archives.php (notice the S at the end!!!) are two very different things in WP.
    I have never mentioned the archives.php - which is a Page template and has nothing to do with what you want...

    The template file I mentioned is archive.php (no plural -s) and it is one of the core files of a theme! Please, take a look at:
    a) the Codex link I gave you above
    b) the Default theme that has both of them
    and learn the difference between them.

    I still state my answer covered exactly your question in the first round.

  6. l2parent
    Member
    Posted 7 years ago #

    i figured out how to get the comic post links to work in the archives, yet be invisible on the index page.

    the full statement is (for anyone else who might need it):

    <?php if ( !(in_category('7') && is_home()) ) { ?>

    sorry for the confusion.

Topic Closed

This topic has been closed to new replies.

About this Topic