WordPress.org

Ready to get started?Download WordPress

Forums

Used Catogories to Seperate Posts: Have I Painted Myself into a Corner? (8 posts)

  1. martcol
    Member
    Posted 2 years ago #

    The Site is Pictopoetry.co.uk

    When I first set this up I used category pages for blog posts. This is because the site owner needs to post poems and blog.

    Now I am using WPBook and notice that the way that it calls the blog into Facebook in the APP page doesn't display the two menus items in the site for "Blog" and "Poems." I am guessing this is because I am using a catogory template for those pages?

    I can live with this but I wonder how I might get around it?

    Thanks

    Martin

  2. martcol
    Member
    Posted 2 years ago #

    So, to ask a different way:

    Can I have a page that shows posts from category A and not category B and another page or pages that show posts from category B and not A? Could I have more complicated permutations than that?

    It's OK to have the loop on lots of pages isn't it?

    Is that better than having a menu item that links to a category template?

    Thanks

    Martin

  3. keesiemeijer
    moderator
    Posted 2 years ago #

    You can create two Page template files. One that shows category A and one that shows category B using query posts.

    http://codex.wordpress.org/Function_Reference/query_posts
    http://codex.wordpress.org/Function_Reference/WP_Query

  4. martcol
    Member
    Posted 2 years ago #

    Many thanks,

    I'm presuming then that it's ok to do this. I do recall reading in the past that you should or could only have posts on one page.

    Thanks again

    Martin

  5. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    It's perfectly ok to have multiple pages containing posts.

  6. martcol
    Member
    Posted 2 years ago #

    Thank you,

    I'm on it!

    Martin

  7. martcol
    Member
    Posted 2 years ago #

    OK. I am stumped.

    Here's my poem.php page: http://pastebin.com/w9m7nXx9

    Here's the page on the site: http://www.pictopoetry.co.uk/poem/

    I haven't even started to try to specify a category yet because the page isn't doing what I want.

    My PHP skills are er.. minimal and all I do is cut and paste from pages of TDH's notesblog core theme.

    If you can give me a bit of guidance....

    Thanks

    Martin

    PS: the problem is it shows the page and not the posts.
    Oh, and the other page in the menu for Poems is a category template (that was easy).

  8. keesiemeijer
    moderator
    Posted 2 years ago #

    Right now it is showing the Page you published. As a normal page would do. You need a query on the loop to replace the Page content with posts with the category A or category B.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags