• Resolved ecohostingservices

    (@ecohostingservices)


    Hi
    If you add ‘#’ as the URL it still shows up with a link when you hover over it. So when I set up custom links that is at the parent level I delete the ‘#’ and it works.

    But this plugin needs the ‘#’ to make the sitemap work. How can we change the code so that it accepts an empty string or it’s empty in the URL?

    I have been trying but I can’t get it to work as the text for the parent level does not appear.

    Can this plugin be updated to include the empty URL box in the Custom Menu Link? Please.

    Cheers

    Colin

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ecohostingservices

    (@ecohostingservices)

    Just a follow up. I created another Menu and called it Site Map and followed what was said in the instructions and it worked.

    Before I set the Sitemap using the same Menu as the Primary one that existed as it allowed me to in the Menu setup i.e I checked both boxes to use it as the Primary and the Sitemap. Maybe this should be changed to an option box to prevent using the same Primary Menu within WordPress with another one.

    Also it would be nice in this plugin to copy an existing Menu like my Primary one especially if it was large or complicated and then use and set that as the Sitemap and then follow the instructions by adding the ‘#’ into the URL field……

    Colin

    Thread Starter ecohostingservices

    (@ecohostingservices)

    If I visit the Sitemap page only it is now interfering with the Primary Menu. No other page does this so the code in the plugin must be interfering with the Nav Menu itself. The main menu has strunk as I have too many items on it but this is not part of the problem. I will fix that later.

    On the main menu, About, Websites & Services are custom links are now combined this should not be happening.

    In the main menu it does not matter if I use a ‘#’ or not…..

    I am using a Bootstrap theme called Understrap with a child theme from the same theme developer.

    Can this be fixed?

    Problem page

    Colin

    Thread Starter ecohostingservices

    (@ecohostingservices)

    I have now fixed the Custom Menu links and changed this JS code to include the Classes etc. to this:

    <script type="text/javascript">
    			(function( $ ) {		  "use strict";		
    				$(function() {
    					$('.menu-item-type-custom > a').each(function() {
    						if ($(this).attr('href') == '#') {
    							$(this).replaceWith('<a data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="dropdown-toggle nav-link"><span>' + $(this).text() + '</span></a>');
    						}
    					});
    				});
    			}(jQuery));
    			</script>

    This code was in a file called ssmp-public.php and under a folder called Public.

    I tried another Theme and it worked alright but it didn’t work with my theme i.e. Understrap.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable WordPress Parent Menu Link’ is closed to new replies.