Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to use bp_nouveau_plugin_hook

  • @rafaelfigueiredo

    Participant

    I’m developing a plugin that create a page tickets with the function bp_setup_nav.

    bp_core_new_nav_item( array(
    			'name' => ('ticket'),
    			'slug' => 'ticket',
    			'position' => 30,
    			'screen_function' => 'ticket_screen'
    		) );
    function ticket_screen(){
    include_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/partials/agenciadosite-buddypress-boleto-public-boletos.php';
    	}
    }

    This way I’m trying is not working. So now I’m trying to use the hook ‘bp_nouveau_plugin_hook’. How I can use? This is the right way to add a page template through my plugin?

Viewing 4 replies - 1 through 4 (of 4 total)
  • @prashantvatsh

    Participant

    @rafaelfigueiredo

    Participant

    Hi prashantvatsh, thanks!

    Reading your shared code I think I need to create a new component. Right? Can you send me more instructions about this? Thanks!

    @rafaelfigueiredo

    Participant

    Hi all,

    I find my answer here:

    Adding BuddyPress Custom Pages to Profiles

    Through this tutorial I was capable to create the menu and render my template.

    ——————————————————————

    Prashant, if you can send me more tips about your way to do this I aprreciate.

    @prashantvatsh

    Participant

    Great to know that it worked for you 🙂

    This is a fine approach always to create a menu/tab on profile and then display your content there either by echoing your own HTML or calling a template.

    Thanks

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