WordPress.org

Ready to get started?Download WordPress

Forums

Post category as page? (7 posts)

  1. xionkid
    Member
    Posted 4 years ago #

    Hi!
    I have a static homepage on my website and a page called “news” where all the posts end up when they are published.
    Now.. I would like to have sub-pages to the page news witch should be the post categories. How do I achieve this?

  2. David Gard
    Member
    Posted 4 years ago #

    Are you using the standard WP dynamic sidebar? If so, you can list all the categories in there ('Apperance -> Widgets') and clicking on each will automatically filter only that category on your posts page.

  3. xionkid
    Member
    Posted 4 years ago #

    yeah, I know. But i would like the categories to be subpages to the news page. It looks better that way.

  4. David Gard
    Member
    Posted 4 years ago #

    wp_list_categories()

  5. David Gard
    Member
    Posted 4 years ago #

    That will list the categories on your page, your can if you wish also use $pages = wp_list_pages('echo=false') and $categories = wp_list_categories('echo=false') and then use some of the standard PHP string functions to amend the $pages result to get your desired combination of pages/categories, which you can echo.

  6. xionkid
    Member
    Posted 4 years ago #

    I did not understand a thing of what you just wrote. Can you please try to explain in another way.

  7. David Gard
    Member
    Posted 4 years ago #

    How about looking up the codex for the usage of wp_list_categories() and wp_list_pages(), that will be far better than any explaination I can give.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.