Dynamic Menu with custom header

Hello,

I have the following code in functions.php:

add_filter( ‘wp_nav_menu_items’, ‘wti_loginout_menu_link’, 9996, 2 );
function wti_loginout_menu_link( $items, $args ) {
if ($args->theme_location == ‘primary’) {
if (is_user_logged_in()) {
global $current_user; get_currentuserinfo();
$items .= ‘

  • Welcome ‘. $current_user->user_login .’!
  • Hi There,

    Thanks for writing in!

    when you active Pro custom header to a page it will replace the original header and its content.
    Regarding the PHP code that you have mentioned, you can register a short code for this in function file of your child theme and use the short code in the header builder.

    here is reference how you can create your own custom short code.

    Hope this is clear now…

    Thanks

    Thank you. Where should I place the short code? I placed it in a text element, but it did not work.

    Nevermind. I figured it out. Thank you for your help.

    you are most welcome

    This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.