• Hi Folks,

    Can someone please help me code a page of posts of a certain category?

    I’ve setup a news category, and have the code below to display the posts within the categrory, can someone please tell me which page it needs to go on and how to do it?

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • See a page of posts for an example.

    Thread Starter matthisco

    (@matthisco)

    Thanks for you reply, really appreciate it.

    I have created the pageofposts.php page, uploaded it to my theme folder, created another page called news with no content and chose the pageofposts page as its template.

    However nothing appears when I browse to the page, do I need to pass the category ID of posts to this page somehow?

    Any help very much appreciated.

    Thanks again

    If you read the page at the link above, the first example uses a custom field to select posts. You need to amend the example code to suit your needs. https://pastebin.com/wqyrzZL6 shows a “page of posts” template that lists all posts in the Uncategorized category in a Twenty Eleven child theme.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to create page of news posts’ is closed to new replies.