Hey there,
Please can you provide a URL so I can check.
All I can think of at this point is to check the following:
1. Make sure the Use Shortcode option is not turned on.
2. Hit the Update Options button a few more times in my plugin.
3. Clear any WP or server caches.
Please let me know
Peter
Thanks for the response, Peter.
1. http://umsi.org. I have it set up to only appear on smaller-sized screens. The standard menu still works.
2. I did hit the Update button multiple times as I was going along and making changes. I can’t try several updates at once at the moment, but I can try this when I get home.
3. My cache tripped me up earlier on, so I disabled the caching for now until I can resolve this.
Thanks!
Daniel
Hey Daniel,
Strange that it is all working except the menu itself.
Do you have it set to “ON” in the Menu > Section Ordering options?
https://responsive.menu/docs/basic-setup/menu/
Peter
Alright, I hit the buttons several times in a row and nothing changed. Also yes, it is set to on. I tried switching everything on and off a few times just to make sure earlier.
I’m gonna poke around in the database and see if there’s anything weird going on in there with the menus.
Ok, checked the database and didn’t see anything odd. I also created a new menu to test if the issue was with the old menus, and that didn’t show up either. Very strange.
Also tried deactivating and reactivating the plugin. Took a peek with the inspector, and it’s not rendering the menu links div at all–only the title and search.
Hi there,
Does it work if you disable all other plugins and switch to the base WordPress theme?
Peter
Now we’re getting somewhere. Looks like it’s an issue with the theme. That would actually make more sense than the plugin randomly not working anymore. I’ll bet it’s some CSS somewhere in there–I’ll dig through and post back.
-
This reply was modified 9 years, 3 months ago by
mrdaneeyul.
Hi there,
I wish it were that simple but it cant be a CSS related thing as the menu items arent being output at all rather than just being hidden.
My bet would be something in your theme adding/overriding some core menu functionality which will be alot more difficult to debug I imagine.
Let me know what you find.
Peter
Good call. Looks like it’s in the functions.php file. They had me add a Donate button to the header, so I tacked it on to the menu.
add_filter('wp_nav_menu_items', 'add_donate_button', 10, 2);
function add_donate_button($items, $args) {
if ($args-> theme_location == 'primary') {
return $items.'<li class="donate menu-item"> <form id="donate-form" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="6SGHPD9P7QHDY">
<input type="submit" border="0" name="Donate" value="Donate" alt="PayPal - The safer, easier way to pay online!">
</form>
</li>';
}
}
Deleting it fixes the issue. Now I just need to figure out how I can add it back without breaking things.
EDIT: It’s a bit of a hackish way out, but at this point I’ll take it. I used jQuery().append() to append the HTML to the main navigation and not to your menu. Works now!
It does look like using php to do even the following will break the plugin:
add_filter('wp_nav_menu_items', 'add_donate_button', 10, 2);
function add_donate_button($items, $args) {
if ($args-> theme_location == 'primary') {
return $items.'';
}
}
-
This reply was modified 9 years, 3 months ago by
mrdaneeyul.
Hey there,
That code doesn’t seem to return anything if the menu being used is not “primary”, hence an empty menu.
I imagine if you just add return $items; to the very end of that function that it will work ok.
Peter
Aha. That was it. Rookie mistake on my part. I appreciate the help! Now I can get rid of the jQuery .append() and do it the right way.
Hey there,
Great news and glad it worked for you!
Good luck ahead
Peter