• I have created a WordPress menu:

    $menu_id = wp_create_nav_menu('MyMenu');

    and added menu items to it successfully. They show up in Appearance–>Menus properly.

    At the bottom of the menu list is “Menu Settings” with two check boxes. The first is “Automatically add…” and the second, “Primary Menu (currently set to:)”.

    I need the code to do what happens when the box is checked and I save the menu.

    I am using Thesis-185 as the theme.

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’m sorry but as you appear to be using a commercial theme, you need to seek support from the theme’s developer/vendor. We do not support commercial products here.

    Thread Starter rhj4

    (@rhj4)

    Thank you esmi, but I think you skipped past my question, The Appearance–>Menu is a core WordPress function. What I am asking is what is the API Under that UI. What gets called when the user checks the box associated with the menu name and then presses save?

    It’s part of the Theme API.

    Thread Starter rhj4

    (@rhj4)

    esmi – it is NOT part of the Thesis API. It is entirely within WordPress. I have checked this with diythemes and I have followed the code. There is a convoluted process that the WordPress code goes through to create a new copy of the post each post. I think the problem may have something to do with the edit_lock functionality.

    If there is a write-up somewhere that describes how to create a page and insert it into the menu properly, that would be wonderful.

    It’s part of the Theme API.

    Thread Starter rhj4

    (@rhj4)

    OK, sorry. I misunderstood you; however, the only Theme API’s I can find are Theme Customization and Theme Modification and neither says anything about modifying the menu.

    Perhaps you could take yourself out of ‘terse’ mode and give me an answer that actually tells me something.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘API to set theme menu’ is closed to new replies.