WordPress.org

Ready to get started?Download WordPress

Forums

Calling post category *with pagination* on static WP page? (2 posts)

  1. theadsmith
    Member
    Posted 4 years ago #

    Hey everyone,

    I currently have my site in organized in WordPress pages with the Flexi Pages widget plugin to dynamically generate the page menu tree in the sidebar, based on the wp_list_pages() function. My problem is that I need to add a post category that will function like a standard blog - pages of posts with previous/next links, etc. I'm trying to find some way to get a static page to display a post category, complete with navigation.

    I found this post - http://wordpress.org/support/topic/232712 - which explains how to call specific posts in a page template. However, I need to find some way to call a whole category, so the visitor can see the latest posts from that category and then browse previous pages, etc.

    Alternately, is there a way to get a post category to show up in a certain place in the page menu? Or is there some better way to approach this entirely?

    Any help would be really appreciated.

  2. theadsmith
    Member
    Posted 4 years ago #

    Alright, I found one messy solution, which was to place the category in a similar hierarchy as the corresponding post, then edit the code output by the menu plugin and replace the page link with a link to the post category, as so:

    $pagelist = str_replace('about/welcome/blog/','category/about/welcome/blog/',$pagelist);

    Then I'll have to give the category a template with the appropriate navigation, etc. so it looks like it's part of the page navigation.

    Is there a better way to do this?

Topic Closed

This topic has been closed to new replies.

About this Topic