Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom Theme Template Path


  • Christian Freeman (codelion)
    Participant

    @takinglife2themax

    Hi guys,

    I’m working on adding BuddyPress support to my theme, but I want to load all of the functions and theme template files for BuddyPress in a plugin. Does anyone know how this can be done? Is there a way to change the path in which buddypress searches for the template files?

    Thanks,

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

  • danbp
    Participant

    @danbp


    Christian Freeman (codelion)
    Participant

    @takinglife2themax

    Awesome, thanks! The template overload and BP theme compat documentation is really insightful.

    My goal with this is to create a plugin that loads a BuddyPress theme which can work along with nearly any WordPress theme I switch to. With that said, in your expert opinion, which of the methods you’ve provided will work best from an overall compatibility perspective?


    danbp
    Participant

    @danbp

    Using BP Theme Compat in Plugins.

    BuddyPress has no more theme since 1.9. The old BP-Default theme is only in for backward compatibility.
    If you build a plugin for BP, i don’t think you need to build an extra theme for it. BP use only templates, who have enough flexibility to fit with almost any theme.

    Globally, for a plugin, you have to match with BP’s templates, not with a theme or another.

    Ie. if you need a setting screen on profiles, you can use a simple call to a kind of pre-build template you can use for plugins
    bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );

    By using this, you’re on the profile with a new tab related to your plugin and automatically also integrated to the user’s theme. In other words, BP takes in account your plugin and the theme takes account of BP.

    I wouldn’t recommand to build a theme with a plugin, as they are so many different themes on hand. If you don’t fit to the majority of them for any obvious reason, you’ll get in high difficulties if you are to specific. Don’t forget that you will have a plugin support to manage…

    Made it simple and efficient and if possible, easy maintainable and upgradable. For you but also for any user type.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar