• 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?

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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.

    Thread Starter xionkid

    (@xionkid)

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

    wp_list_categories()

    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.

    Thread Starter xionkid

    (@xionkid)

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

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Post category as page?’ is closed to new replies.