Helping you Build Your Own Social Network!

Faster, better and easier!

Alternate headers

(5 posts) (2 voices)
  • Started 1 year ago by roydeanjr
  • Latest reply from roydeanjr

Tags:

No tags yet.


  1. Ok Brajesh,

    I have review the bp-mag code and I see where you do some different things with the header and nav portions of members and groups in that you add the actions to the before_member and before_group_content.

    If I want to reverse the order, put the nav on top and the header below, is it enough to delete the actions and add them in a different order?

    I am successful in shortening the header, but I am having trouble changing the order.

    Posted 1 year ago #
  2. On the default jes-events templates I am able to change the order for the single event template because the template follows a more common practice of having all the calls in the home.php in the order the designer wants them to show on the page.

    Posted 1 year ago #
  3. Hi Roy, Its easier than you might have thought.

    here is the code for group

    add_action("bpmag_unregister_actions","yourtheme_unregister_hooks");
    function yourtheme_unregister_hooks(){
    //un-register default hooks
    
    remove_action("bpmag_before_group_home_content","bpmag_locate_group_nav");
    }
    add_action("bpmag_before_group_home_content","bpmag_locate_group_nav",5);//let it appear before the header

    The same aplies for jet event/any other single component, except the hooks will be replaced by some other similar hook.

    Posted 1 year ago #
  4. Btw, My basic advise, keep one function in your theme for unregisteting parent hooks. That function shold be hooked to "bpmag_unregister_actions" action, and then add new hooks .

    Posted 1 year ago #
  5. Thank you for the advise. I will modify the function.

    What is the best way to discover the hooks of a plugin? I cannot seem to find the hook that tells me I am viewing the details of an event. I want the complete header to show only on the details page. The other pages would just show an abbreviated header.

    Posted 1 year ago #

Reply

You must log in to post.