WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Creating a Page to Display One Category (4 posts)

  1. cogito
    Member
    Posted 8 years ago #

    I have seen shades of this question asked over and over, but I can't seem to find a suitable answer for my needs. I have a very minimal knowledge of PHP, but I can follow directions quite easily.

    Basically, I want to create a Page and then pull the posts of one category onto that page. It would work EXACTLY like the default category page, but as a normal page.

    To clarify, I am writing for a print publication called BNQ; I want to be able to direct people to my website at http://jacobmorse.com/bnq rather than http://jacobmorse.com/category/bnq -- does that make sense? If so, how would I go about accomplishing this?

  2. maerk
    Member
    Posted 8 years ago #

    It's all about The Loop :)

    See also The Loop In Action

  3. lonelychina
    Member
    Posted 8 years ago #

    I am using a code which can do the job.
    Create a php page and use following code anyware you want.

    Remember to set ID number of the category from which you want to drag the posts in your pages.

    <?php c2c_get_recent_posts ($num_posts = 5,
    $format = "

    • %post_URL%
    ",
    $categories = '3', // space separated list of category IDs -- leave empty to get all
    $orderby = 'date',
    $order = 'DESC', // either 'ASC' (ascending) or 'DESC' (descending)
    $offset = 0, // number of posts to skip
    $date_format = 'm/d/Y', // Date format, php-style, if different from blog's date-format setting
    $authors = '', // space separated list of author IDs -- leave empty to get all
    $include_passworded_posts = false) ;?>

  4. cogito
    Member
    Posted 8 years ago #

    I am quickly realizing it's "All about the Loop." :)

    Lonely, that's EXACTLY what I'm looking for. Many thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags