BuddyDev

Search

[Resolved] BuddyBlog Pro Posts Layout

  • Participant
    Level: Master
    Posts: 279
    NikB on #46176

    Hi Brajesh

    I’ve now purchased BuddyBlog Pro and so far so great, except that I’m trying to find a way to edit the template which displays the posts on a user’s profile.

    Following other posts here, I’ve tried the following paths –

    mychildtheme/buddyblog/posts.php
    mychildtheme/buddyblog/default/posts.php
    mychildtheme/buddyblog/buddyboss/posts.php
    mychildtheme/buddyblog/buddyboss/default/posts.php

    … none of which seem to work…

    I’m using BuddyBoss (client insisted 😉 ) with the BuddyX Pro theme and starting to wonder if it’s the theme that’s got a non standard way of handling things. Any suggestions how I might go about “debugging” this? (Note: for what it’s worth, I can see that the template currently being used is coming direct from plugins/buddyblog_pro/templates/buddyblog/buddyboss/default/posts.php… I just can’t figure out where I need to locate this in my child theme to be able to edit it.)

    With many thanks in advance
    Nik

  • Participant
    Level: Master
    Posts: 279
    NikB on #46178

    Update: after further investigation, it seems that the correct template path for my theme (which isn’t any of those included with BuddyBlog Pro eg. BuddyBoss, Kleo etc) needs to be… mychildtheme/buddyblog/default/default/posts.php.

    This feels a bit clunky but since it works, I’ll assume I’m on the right path unless you would advise otherwise Brajesh?

    Regards
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #46182

    Hi Nik,
    Thank you for purchasing.

    Here is an explanation for the section of our template hierarchy.

    1. You will need to create a directory “buddyblog” in your theme/child theme to override template files.

    2. Which template files need to be overwritten can be a bit complicated and depends on your theme

    The basic structure is like this(template loading priority).

    1. your-child-theme / buddyblog / default(current template pack) / post_type|default / $template_name

    2. your-theme / buddyblog / default(current template pack) / post_type|default / $template_name

    3. wp-content/plugins/buddyblog-pro/templates/ / buddyblog / default(current template pack) / post_type|default / $template_name

    For some of the theme which have very different structure, we filter on our hierarchy and there is a theme specific template pack. If that temmplate pack does not contain the file, It will be loaded from ‘default’ template pack.

    in simple words, if you are not using one of the specific themes whose template pack we have supplied, you can simply override buddyblog/default/default/..template file.

    If you want to create post type specific override, you can do so by adding another folder like
    buddyblog/default/your-post-type-name/….

    Hope that helps.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    NikB on #46188

    Thank you Brajesh. I’ve got it now and that all makes sense.

    Thank you also for explaining re. post specific overrides as that would probably have been my next question.

    Regards
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #46202

    Hi Nik,
    Thank you.
    I am glad it was helpful.

    Regards
    Brajesh

The topic ‘ [Resolved] BuddyBlog Pro Posts Layout’ is closed to new replies.

This topic is: resolved