Viewing 4 replies - 1 through 4 (of 4 total)
  • not sure what you are asking.
    The category.php file will dynamically create a page of all posts in a given category.

    Are you trying to add additional content to the result of this page? Are you trying to add the content at above the first post displayed? What is this content? Are you just trying to list the title of each post in the category?

    Be careful when you talk about “page”… “page” in wordpress terminology is something particular… It means a page you created via wordpess.

    https://codex.www.ads-software.com/Pages

    “Category page” is not really a page… It’s a “category template” used to display posts…

    If you want to include some text at the top of a category (the link you gave us is, in fact, a category template), you have two choice :

    Use the category description :
    https://codex.www.ads-software.com/Template_Tags/category_description

    Or use a template for each category that you can edit ton put some text before the loop :
    https://codex.www.ads-software.com/Category_Templates

    —————–

    If you really want to use a “wordpress page” to display category, go read these posts :

    https://www.ads-software.com/support/topic/227151
    https://www.ads-software.com/support/topic/156208

    S.

    Thread Starter Inazuma

    (@inazuma)

    Thanks Simon, that worked.

    For the record, I did mean “page” as in a page created in wordpress. In the OP I linked to the category that I wanted in a page, but adding a description before the category display is fine.

    hi inazuma,

    so how did you do it in the end. i have looked at all the posts regarding this question and not found any code that works.

    please hit me back as this should be a simple and common thing to want to do with wordpress.

    basically it the need to skip listing the categories in the sidebar and go straight to listing a category in a page.

    so if you had a page called “beach”, and you wanted to list all the posts that have been made under the category ‘beach’, you could. i assume you need to make a template page called beach.php
    and in that page you’d have a few lines of code that gets all the categories and then only looks at the one that you want (ie: cat=3) or whatever, then you display only that category. all the posts in that category are displayed one after the other down the page.

    i reckon there should be a plugin for this so you can choose one category from the list of categories you have, and then order the results in whatever order you want them displayed.

    i tried ‘list-category-posts’ plugin but it is a widget that lists the categories in the sidebar which is what we are trying to avoid. there is a default widget already for that.

    thanks again, hope to hear from you soon

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How do you display posts from a category on a page?’ is closed to new replies.