Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom Category Post Page

  • @akingston47

    Participant

    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)
  • @jamesmarsland

    Participant

    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

    @akingston47

    Participant

    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?

    @jivany

    Participant

    @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.

    https://codex.wordpress.org/The_Loop

    @jamesmarsland

    Participant

    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.

    @akingston47

    Participant

    @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)
  • The topic ‘Custom Category Post Page’ is closed to new replies.
Skip to toolbar