There’s a variety of ways to achieve this, one way is to overload the BP Template profile header template file. It’s located in plugins/buddypress/bp-templates/bp-noveau(or bp-legacy)/buddypress/members/single/cover-image-header.php
assuming you are using profile cover images.
This file constructs the members header, if you copy it to themes/your-theme/buddypress/members/single/cover-image-header.php
you can edit it and insert a button in there.
Dear @venutius thanks your reply
I did your suggestion but it did not work, my wordpress is 4.9.6 and buddypress is 3.1.0
What code are you using? put it between ` backticks to have it format properly.
like below:
<form>
<input type=”button” value=”Book now” onclick=”window.location.href=’#” />
</form>
Where did you put it? could you include the code that it was inserted into?
in
cover-image-header.php
Dear @venutius please describe me detailed, I am beginner in wordpress and codex
I think as a first try I’d insert it here:
<?php
bp_nouveau_member_header_buttons(
array(
'container' => 'ul',
'button_element' => 'button',
'container_classes' => array( 'member-header-actions' ),
)
);
?><form>
<input type=”button” value=”Book now” onclick=”window.location.href=’#” />
</form>
<?php bp_nouveau_member_hook( 'before', 'header_meta' ); ?>
<?php if ( bp_nouveau_member_has_meta() ) : ?>
<div class="item-meta">
in which php file I should add this code?
Do this code mention booked user ID at top of the form?
Might be wise to confirm with you which bp theme you have in dashboard>>settings>>buddypress>>options ? are you running Nouveau?
my bp them is sweetdate
The selected Template Pack will serve all BuddyPress templates running buddypress Nouveau
This might not work then, Sweetdate may have overloaded the cover-image-header already, you will probably need to ask them about overloading.
Thank you @venutius
I hope my issue will be solved!