Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to use hooks like bp_nouveau_signup_hook?


  • corsi159
    Participant

    @corsi159

    Hello,

    I would like to add some text on top of the register page, and I first tried to follow the instructions from this post : https://buddypress.org/support/topic/how-to-edit-the-text-in-registration-page/

    But I am using Buddypress Nouveau, and bp_before_register_page seems to not exist anymore.

    From what I’ve seen in the register.php file, I have to use instead bp_nouveau_signup_hook( ‘before’, ‘page’ )

    My problem is that I have no clue how to pass the “before” and “page” parameter to the hook…

    I tried this in the bp-custom.php, with no success :

    function my_custom_register_msg_title() {
    echo '<h3>My custom text</h3>';
    }
    
    add_action('bp_nouveau_signup_hook("before","page")', 'my_custom_register_msg_title' );

    Could someone please be kind enough to tell me what’s wrong in my add_action?

    Thanks in advance!

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

  • Prashant Singh
    Participant

    @prashantvatsh

    Hi,

    Please try this snippet:

    function my_custom_register_msg_title() {
    echo '<h3>My custom text</h3>';
    }
    
    add_action('bp_before_register_page', 'my_custom_register_msg_title' );

    Thanks


    corsi159
    Participant

    @corsi159

    Thank you for your answer Prashant.

    I thought it wouldn’t work as this hook doesn’t appear anymore in the register.php of BP Nouveau. Looks like I didn’t understand yet how all of this works.

    Sorry about that!


    Prashant Singh
    Participant

    @prashantvatsh

    Not a problem. In the nouveau template, this is the way we are using hooks.

    Thanks

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