Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1304038
    khomiko
    Participant

    Is there a way to echo an id with php into the header above all of the content? I would like the item-header in this image to appear above all the content if a user is logged in. Please and thank you ๐Ÿ™‚

    #1304039
    khomiko
    Participant

    http://tinypic.com/view.php?pic=2vdi33t&s=9

    Image was too big, so I uploaded it to tinypic

    #1304062
    khomiko
    Participant

    I think <?php do_action( ‘bp_before_member_header’ ); ?> needs to be added to the integrity content/sidebar template. I don’t know exactly how to do that though. When I do it, it only shows on the profile page, but doesn’t take on the css that is on the profile page.

    #1304233
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! You can add a custom function in your child theme and inject the custom image when a user is logged in. Assuming that your child theme is set up, please add the following code in your child themeโ€™s functions.php file

    // Add Custom Image Header when a user is logged in
    // =============================================================================
    function add_image_header(){ ?>
    
      if ( is_user_logged_in() ) {
      
        do_action( 'bp_before_member_header' ); 
    
      }
    
    }
    add_action( 'x_after_view_integrity__landmark-header', 'add_image_header' );
    // =============================================================================

    Hope this helps.

    #1304268
    khomiko
    Participant

    It gave me a syntax error.

    #1304273
    Darshana
    Moderator

    Hi there,

    Sorry for the inconvenience caused. Please update your code as follows.

    
    // Add Custom Image Header when a user is logged in
    // =============================================================================
    function add_image_header(){ 
    
      if ( is_user_logged_in() ) {
      
        do_action( 'bp_before_member_header' ); 
    
      }
    
    }
    add_action( 'x_after_view_integrity__landmark-header', 'add_image_header' );
    // =============================================================================
    

    Hope that helps.

    #1304279
    khomiko
    Participant

    No inconvenience here ๐Ÿ˜› Two problems though.

    1) It only shows on the profile pages. Since I already have it here, I would rather it not show on these pages.

    2) It doesn’t take on the same css properties as on the profile pages.

    http://tinypic.com/view.php?pic=2vjtsh3&s=9#.WGCbS1MrKUk

    #1304298
    Paul R
    Moderator

    Hi,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1304317
    khomiko
    Participant
    This reply has been marked as private.
    #1304353
    Paul R
    Moderator

    Hi,

    Kindly change the code to this.

    
    // Add Custom Image Header when a user is logged in
    // =============================================================================
    function add_image_header(){ 
    
      if ( !x_is_bbpress() ) {
      
        do_action( 'bp_before_member_header' ); 
    
      }
    
    }
    add_action( 'x_after_view_integrity__landmark-header', 'add_image_header' );
    // =============================================================================
    

    Hope that helps.

  • <script> jQuery(function($){ $("#no-reply-1304038 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>