WordPress.org

Ready to get started?Download WordPress

Forums

How to get menu id ? (8 posts)

  1. saeedqs
    Member
    Posted 2 years ago #

    i am doing some customization in header section i want to know that i can get menu id ?i want to make if else check

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    The menu id for what?

  3. saeedqs
    Member
    Posted 2 years ago #

    dynamic menu of my site which i made from admin

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    Unless you provide more details, we can't help you.

  5. esmi
    Forum Moderator
    Posted 2 years ago #

    No. Problems are solved on the forum - not via email.

  6. saeedqs
    Member
    Posted 2 years ago #

    ok no problem
    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    i used this function to fetch menu in my site. here i need to make if else check that if it is service page the hyperlink of contact us menu will b different. for this purpose i need menu id

  7. esmi
    Forum Moderator
    Posted 2 years ago #

    You can't add a conditional inside that function.

  8. saeedqs
    Member
    Posted 2 years ago #

    thanks for quick reply lol hahah

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.