BuddyDev

Search

[Resolved] Fullwidth header and user menu

  • Participant
    Level: Enlightened
    Posts: 120
    nana on #7875

    Thanks Brajesh! You are the best!

  • Participant
    Level: Enlightened
    Posts: 120
    nana on #7968

    Another question, how to get header menu sticky?

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2932
    Ravi on #8218

    Hello nana,

    Please use the following code to add custom banner image before header.

    
    add_action('cb_before_header','buddydev_custom_banner_image');
    function buddydev_custom_banner_image() {
    	// replace by your link url.
    	$link_url = 'https://google.com';
    	// replace image url with your image url.
    	$image_url = 'http://localhost/dev/slideraddons/wp-content/uploads/2017/03/323H.jpg';
    	printf('<a href="%s"><img src="%s" /></a>', $link_url, $image_url );
    }
    
    

    Thank You
    Ravi

  • Participant
    Level: Enlightened
    Posts: 120
    nana on #8223

    Hi!

    I put in mi fuction.php Child theme:

    add_action(‘cb_before_header’,’buddydev_custom_banner_image’);
    function buddydev_custom_banner_image() {
    // replace by your link url.
    $link_url = ‘https://my_url_web.com/&#8217;;
    // replace image url with your image url.
    $image_url = ‘http://public_html/wp-content/uploads/2017/02/fond.jpg&#8217;;
    printf(‘‘, $link_url, $image_url );
    }

    But it doesn´t work…

    • This reply was modified 7 years ago by nana.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2932
    Ravi on #8237

    Hello Nana,

    Replace the following line of your active child theme functions.php file

    
    printf(‘‘, $link_url, $image_url );
    

    with

    
    printf('<a href="%s"><img src="%s" /></a>', $link_url, $image_url );
    

    and let me know if it works or not.

    Thank You
    Ravi

  • Participant
    Level: Enlightened
    Posts: 120
    nana on #8238

    Sorry, I copied and pasted with error earlier. It was like this:

    add_action(‘cb_before_header’,’buddydev_custom_banner_image’);
    function buddydev_custom_banner_image() {
    // replace by your link url.
    $link_url = ‘https://my_web.com/&#8217;;
    // replace image url with your image url.
    $image_url = ‘http://public_html/wp-content/uploads/2017/02/fond.jpg&#8217;;
    printf(‘‘, $link_url, $image_url );

    }

    Not works

    • This reply was modified 7 years ago by nana.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2932
    Ravi on #8242

    Please make sure that your file is named “functions.php” and not “function.php”

    Let me know if that is the case.

  • Participant
    Level: Enlightened
    Posts: 120
    nana on #8243

    It´s Ok. Sorry my english! 🙁

    wp-content/themes/community-builder-child/functions.php

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2932
    Ravi on #8244

    Hello Nana,

    Is the issue still persist or resolved?. Please let me know.

    Thank You
    Ravi

  • Participant
    Level: Enlightened
    Posts: 120
    nana on #8245

    Everything like you told me, and it does not work

The topic ‘ [Resolved] Fullwidth header and user menu’ is closed to new replies.

This topic is: resolved