3

This is with respect to a buddypress addon (plugin) whose theming I am unable to do. I searched many sites but unable to get a concrete solution. In the plugins page, Header is getting disturbed if its a buddypress theme but is working fine in default wordprress themes. I am using this code at present at the top of the template page

<?php get_header('buddypress'); ?>
<div id="buddypress">
    <div id="profile">
    <div class="row">

Than the following stuff like

 <?php do_action( 'bp_before_member_home_content' ); ?>
    <div id="item-header" role="complementary">
        <?php bp_get_template_part ( 'members/single/member-header' ) ?>
          </div><!--#item-header-->

I feel this is not the right way to do. I want to know if the plugin has to copy the buddypress template header without disturbing footer or sidebar how it can be done. i.e my plugin should show only the plugin content and should not disturb any part of the buddypress template.

Amit Ray
  • 3,445
  • 2
  • 19
  • 35
  • Hi Amit, I am assuming this is a custom addon you are building. Buddypress now uses themes which build their own headers etc as I'm sure you know. If you can give an indication as to what exactly you are trying to do - what content you are trying to add, it will be more clear how you may be able to proceed – Liam Bailey May 10 '15 at 18:01
  • Thanks for the reply. Yes this is a buddypress gifts plugin in wordpress. Heres the link https://wordpress.org/plugins/buddypress-gifts-latest-2014/ . it works flawlessly in default theme but gets disturbed if i use buddypress theme. – Amit Ray May 12 '15 at 09:13
  • I don't know if the link you provided is the latest code, but if it is then it needs a major redevelopment in order to bring it in line with the new way Buddypress works. In order to do that I think you may need more help than just an answer to a question, I recommend hiring someone to bring the plugin inline with the new buddypress, and ask them to comment their code so you can see what they did. – Liam Bailey May 12 '15 at 11:12

1 Answers1

0

you have to edit your buddy press header with your html structure. and keep buddy-press functionality as it is.

Mayur Devmurari
  • 496
  • 9
  • 16
  • I tried to do that but it gets disturbed if I change the template. In joomla CMS there is a fixed place for the content of a component and whatever template you use there is no need to change any theme inside the component. I want similar functionality in my buddypress plugin which can be used by everyone without any issue irrespective of whatever template they are using. – Amit Ray May 05 '15 at 10:55
  • then just call get_header(); function in your buddy-press header to act as default header. – Mayur Devmurari May 05 '15 at 11:42