WordPress.org

Ready to get started?Download WordPress

Forums

Make one category show on only one page (9 posts)

  1. pwdiane
    Member
    Posted 4 months ago #

    I want to make a page that shows all the posts from one category. I don't want those posts to show on my home page. How do I do that?

    Thanks for your help.
    Diane

  2. dragonsjaw
    Member
    Posted 4 months ago #

    The beginning of that I think would be to make a new category template and query the 1 category you want in that archive..
    and then adjust the loop on the posts page to not show that 1 category.

  3. dragonsjaw
    Member
    Posted 4 months ago #


  4. Bryan Purcell
    Member
    Posted 4 months ago #

    pwdiane,

    While dragon's jaw has an approach that will work - I think the solution to you question is in fact much simpler. What is this category that you'd like excluded from the homepage? It seems to me that custom post types might be able to help. A custom post type is like another "type" of post. They behave the same as posts, but they don't show up with the posts on the homepage, and their archive collection appears at a different spot on your site (http://yoursite.com/<post type name>

    So, if you had a normal blog, with normal posts, and you wanted to have a list of Film reviews you wanted to keep seperate, you could make a custom post type for "Film Reviews" and those posts would live at http://yoursite.com/film-reviews

    it would have the same layout as normal posts, but the posts visible at http://yoursite.com/film-reviews would only include film reviews.

    If this seems like it fits, install Brad Williams awesome Custom Post Types UI plugin. Once installed, hover over CPT UI in the left hand dashboard tabs, and select "Add New" then, in the "Post Type Name" field type the name of your category, and click "Create Custom Post Type" your post type will now appear in the Dashboard and you should be off to the races. A listing of posts in that category will be available at http://yoursite.com/<category&gt; keeping in mind that spaces are now "-" to conform with web URL standards.

    Let me know what you think, or if you have any questions!
    :) Bryan

  5. pwdiane
    Member
    Posted 4 months ago #

    Hi Bryan,

    I am trying your suggestion. I installed Custom Post Types UI. I added a new post type, "letters".
    I found "Letters" listed on the left under "Comments."
    I added a post using the "add letters" link and published it.

    Now how do I see it on my site? My url is: westsub.mikediane.com/

    Thanks for your help,
    Diane

  6. Bryan Purcell
    Member
    Posted 4 months ago #

    Great! Ok- Check out http://westsub.mikediane.com/?post_type=letters

    That should show a listing of your letters! I'd recommend turning on permalinks in Settings / Permalinks in the dashboard to get pretty URLs, as well!

  7. dragonsjaw
    Member
    Posted 4 months ago #

    Wish I had understood custom post types long ago when I did something similar.. will keep this info on hand for a new site I am working on.

    thanks!

  8. pwdiane
    Member
    Posted 4 months ago #

    I've got it working.
    I liked your idea of pretty URLs and did that. But it doesn't seem to make the post_type=letters pretty. Is there something else I need to do?

    Thanks so much for your help! This is going to be very helpful.

  9. Bryan Purcell
    Member
    Posted 3 months ago #

    zoinks! sorry - lost track of this thread.

    This is actually really easy to to. Go to CPT UI in the dashboard. Select Edit Post Types from the sub menu.

    Click edit on your Letters post type, and switch "Archive" from False to True.

    That should do it. Now your letters are available at http://westsub.mikediane.com/letters

    let me know how that works!

Reply

You must log in to post.

About this Topic

Tags