Forums

Using a page to hold categorised posts (5 posts)

  1. mjhubba
    Member
    Posted 1 year ago #

    Hello
    I want to have a page that only displays certain posts that I categorise as being 'Just For You'
    Is that possible or is there an easy way round this.
    I still want my home page to be a rolling posts one and don't mind if the Just For You appears there too but I do want the Just For You posts to all go on a separate page too.
    Thanks
    Michelle
    http://www.mummyratesit.co.uk

  2. keesiemeijer
    moderator
    Posted 1 year ago #

    Look at: http://codex.wordpress.org/Pages#A_Page_of_Posts
    just change this line:

    'category_name' => 'antiquarianism, championship', // Change these category SLUGS to suit your use.

    to

    'category_name' => 'just-for-you', // Change these category SLUGS to suit your use.

    if "just-for-you" is the category slug.

    This Page of Posts makes use of a custom Page template:
    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

    and queries the loop:
    http://codex.wordpress.org/Function_Reference/query_posts
    http://codex.wordpress.org/Function_Reference/WP_Query

    http://codex.wordpress.org/The_Loop

  3. mjhubba
    Member
    Posted 1 year ago #

    Thank you for you help. I have created a Page of Posts which looks like this (below) however it's now throwing up an error on my Just for YOU page. Can anybody see why? Thank you

    [Code moderated as per the Forum Rules. Please use the pastebin]

  4. keesiemeijer
    moderator
    Posted 1 year ago #

    maybe <?php get_footer(); should be <?php get_footer(); ?>

    Create a child theme for these changes if you are using twentyeleven.

  5. mjhubba
    Member
    Posted 1 year ago #

    I kept putting this off but today (despite fuzzy head) Cowboy'd up and did it. Thanks so much keesiemeijer
    Michelle x

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags