WordPress.org

Ready to get started?Download WordPress

Forums

Delicate
Delicate : How to change menu after user login (1 post)

  1. june_c21
    Member
    Posted 1 year ago #

    HI , i am new to wordpress. i would like to know how to change the visitor menu to user menu after user login . currently i using delicate template .

    Here is my code :

    function custom_menu()
    {
    if( is_user_logged_in() )
    {
    $custom_menu = 'LoginMenu';
    }
    else
    {
    $custom_menu = 'VisitorMenu';
    }
    wp_nav_menu( array( 'menu' => $custom_menu, 'theme_location' => 'primary' ) );
    }
    add_action('wp_footer', 'custom_menu');

    but i don't know how to move wp_footer to the menu bar . someone can help ?

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.