• Resolved mrmccarrin

    (@mrmccarrin)


    Hi,

    My website is https://www.pearsonkoutcherlaw.com. I am writing becasue I am trying to add menu items to my site and am having difficulty firguring out the menu number item. EX: ` <li id=”menu-item-738″ class=”menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-359 current_page_item menu-item-738″>
    <a href=”<?php echo site_url(); ?>”>Home</a>`

    I understand the menu was first created under appearance – menu and then this code above was added to the header, but I do not understand where those numbers come from. Can someone please help put me in the right direction?

    Thanks!

    Megan

Viewing 4 replies - 1 through 4 (of 4 total)
  • While I may have a hard time explaining how the numbering system works – That should not prevent you from adding new menu items. You can continue to go to Appearance > Menus and add/remove menu items, the generated id’s should not have any impact there. Only if it is being used as a target for CSS or JS and in that case, you can add your own classes if you just open up “Screen Options” at the top of your screen while in Appearance > Menus and click the checkbox for “CSS Classes” to show the new field.

    Thread Starter mrmccarrin

    (@mrmccarrin)

    Thank you for getting back to me. I just am a little confused because when I go to Appearance > Menus and add/remove menu items, nothing happens. The only way I am able to remove items from my menu is to go to appearance > Editor > Header and remove items from there. Why is that?

    It could be that your theme is creating the menu elsewhere. Though the markup looks like it is from wp_nav_menu() – In Appearance > Menus, if you select the dropdown menu to choose your menu, there is no menu named “Main Navigation”?

    The only way I am able to remove items from my menu is to go to appearance > Editor > Header and remove items from there.

    The Menu Customizer hasn’t been merged with core yet so unless you are using the development build, I’d assume it’s a plugin or your theme adding that functionality.

    Thread Starter mrmccarrin

    (@mrmccarrin)

    I got it now! Thank you for your help ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Menu PHP’ is closed to new replies.