Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom Category Post Page

  • Avatar of akingston47
    akingston47
    Participant

    @akingston47

    Please could someone tell me how I can create a custom BP page to show posts from a specific category. I have tried to just modify a copy of index.php but can’t seem to get it working.

    Also, assuming I can get that working is it then possible to pull all blog posts from the specific category in user blogs into this custom page on the main blog? When I look at sample BP sites I see a lot of them have user blog posts displayed on the main site so I thought it must be something straightforward but it doesn’t seem to be.

    Thanks in advance for your help..

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of Jamie Marsland
    Jamie Marsland
    Participant

    @jamesmarsland

    I use the ‘Page Links’ To plugin. This allows you to set a custom permalink for your page which you can set to call posts from any category. Eg http://www.example.com/category/yourcategory

    Avatar of akingston47
    akingston47
    Participant

    @akingston47

    Thanks for that @james. However is that not similar to using a template for the page? Either way though, the trouble I’m having is with the code to actually display the posts from a specific category. Any chance you could let me know how you wrote it?

    Avatar of jivany
    jivany
    Participant

    @jivany

    @akingston47: What you’re looking for is basic WP functionality. If you want to see all of the posts for a category, navigate to the category index page/URL like @Jamesmarsland suggested.

    If you want to do this on a page, you need to modify WP “the-loop”. There’s a whack of information on the WP codex about how to do this sort of stuff.

    http://codex.wordpress.org/The_Loop

    Avatar of Jamie Marsland
    Jamie Marsland
    Participant

    @jamesmarsland

    Here’s an example – http://www.leckhamptononline.co.uk/category/videos/ . As @jivany says this is standard wp functionality. This pulls all the posts in with the category ‘video’ which i think is what you want to do. All you have to do then is hard code the url that calls the categories into your menu. I use the ‘page links to’ plugin to do this. It’s really easy.

    Avatar of akingston47
    akingston47
    Participant

    @akingston47

    @jivany – thanks for the help. @jamesmarsland – thanks again. Sorry I kind of misunderstood what you said originally – I was thinking I wouldn’t be able to customise the page but then I remembered I can save a copy of the archives page as category-3.php (for example) so now it works out perfectly. Only thing is I would prefer not to have to use a plugin for it though..

    Only thing I have to figure out now is how to pull in posts in that category from user blogs. Any ideas? I was planning on using the MU category mapping plugin but it doesn’t work anymore.

    Thanks again for the help.

    @jamesmarsland I like your site by the way. I was actually looking through it the other day after seeing the link on twitter..

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.