-
Author
-
October 1, 2015 at 13:34 #80249HDcmsParticipant
Hi,
I display an information notice when I’m on the profile page.
Everything works fine.
I am now display a notice on all buddypress pages (profile, groups, messages …)I tried several do_action but none works.
I use a child theme (or bp_custom.php)COPY CODE// NOK add_action( 'after_header_content', 'action_bp_before_container', 10, 0 ); function action_bp_before_container( ) { echo "after_header_content"; } add_action ( 'bp_after_header', 'test_titre' ); function test_titre(){ echo '<h3>HA HA HA</h3>'; } add_action( 'kleo_after_header', 'welcome_msg' ); function welcome_msg(){ echo "kleo_after_header"; } // OK add_action( 'bp_before_member_home_content', 'action_bp_before_profile_edit_content', 10, 0 ); function action_bp_before_profile_edit_content( ) { echo "<h1>bp_before_member_home_content 1/10</h1>"; }
Regards
October 1, 2015 at 14:17 #80255sharmstrModerator*ALL* bp pages? Or just all BP Profile screens?
COPY CODE// Show notice in member profile add_action('kleo_before_content','add_bp_profile_notice'); function add_bp_profile_notice () { if ( bp_is_user() ) { echo "I'm in a members profile"; } } // Show notice on every bp page add_action('kleo_before_content','add_bp_notice'); function add_bp_notice () { if ( is_buddypress() ) { echo "I'm on a bp page"; } }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Plugins questions’ is closed to new topics and replies.