• Resolved dmd54

    (@dmd54)


    How can I move the tagline from the navigation menu so that it is underneath the logo?

    thanks

Viewing 15 replies - 1 through 15 (of 16 total)
  • You’ll need the following in your child-theme’s php:

    // Move tagline under logo
    // Hook the deletion on the wp_head hook, so it's executed before any html
    add_action ( 'wp_head' , 'move_my_socials');
    function move_my_socials() {
    	// Remove socials from the navbar
        remove_action ( '__header' ,  array( TC_header_main::$instance , 'tc_tagline_display' ) , 20 );
        remove_action ( '__navbar' ,  array( TC_header_main::$instance , 'tc_tagline_display' ) , 20 );
        // Put them back under the logo
        add_action ( '__after_logo' , array( TC_header_main::$instance , 'tc_tagline_display' ) , 20, 1 );
    }

    Checkout How to customize Customizr if you’ve never done this.

    Oops just had it pointed out that 'move_my_socials' is not a very good name for the function. Reuse old code? Me?

    Change 'move_my_socials' to 'move_my_tagline'

    ??

    Thread Starter dmd54

    (@dmd54)

    thanks – will give that a try.

    Thread Starter dmd54

    (@dmd54)

    Cheers for that, worked perfectly. And if I want to completely remove the social icon block from the header can you help with that?

    thanks

    Thread Starter dmd54

    (@dmd54)

    So – the above php worked on my localhost but when I uploaded the theme I’m receiving an error

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'move_my_tagline' was given in /home/content/83/7027783/html/hammertime/wp-includes/plugin.php on line 470

    the theme is live on danielpaymar.com/hammertime

    any ideas how to solve this?

    thanks

    You need to change 'move_my_socials' to 'move_my_tagline' in both places. Did you only change one?

    Thread Starter dmd54

    (@dmd54)

    I certainly did. Totally missed that. Thanks!

    …and to completely lose the Socials from the header, is there a similar action I can use?

    Thread Starter dmd54

    (@dmd54)

    Also – the error is gone but the tagline seems to be completely removed now as well.

    Thread Starter dmd54

    (@dmd54)

    Ok – figured it out. I had removed the action in the header php, so reinstated that and added comments to stop the rendering of the socials.

    thanks again for the help

    But there is an option in Appearance -> Customize -> Social links, to not display socials in header. Then to hide also the container div of the removed social links:

    .tc-header .social-block {
        display: none;
    }

    Changing core files isn’t really needed

    Thread Starter dmd54

    (@dmd54)

    d4 – true but when I used display none, the block element was still present which was pushing the navigation menu over. So it works better to just strike it out completely.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you link the page in question? Maybe it’s not the social-block you need to display none.

    Thread Starter dmd54

    (@dmd54)

    Hi Andrew – it’s at danielpaymar.com/hammertime

    …but as far as I’m concerned it’s working just the way I need it now.

    If you use display: none that block will not make “volume” so doesn’t push anything.
    If you could revert the changes and let us see the issue, would be better.

    Thread Starter dmd54

    (@dmd54)

    I would like to but the 3g i’m using in Indonesia is so terrible it takes ages to make any changes. All I can say is that I tried display none and the nav menu was in the center and using firebug the div for the social icons was still present, just with nothing in it.

    thanks for suggestions.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Move Tagline’ is closed to new replies.