Support » Fixing WordPress » Menu item sub category.

  • Resolved graphomet

    (@graphomet)


    Hi forum

    I have made a nav menu: Home_about_portfolio_contact

    Under the portfolio menu I have made 3 sub items, logos, illustrations, multimedia.

    The problem is with the portfolio mav menu, that I dont for it to be clickable because its an empty page. I have deleted the page which give a 404 messager error.

    The thing id like is for the 3 sub items to be available for someone to click and navigate to and the portfolio in the nav menu just to exist as a category.

    Thank you.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Provide a link to your website as other volunteers may need it to figure out a proper solution to your issue.

    Thanks.

    Hi Samuel.

    My site is under construction. I wouldnt want to unlock it as yet cos its awful.

    Ill post some screen shots if it helps.

    http://dc708.4shared.com/img/eVKExlCHba/s7/14ded658d08/fdsfsdffsdfff?async&rand=0.4933108272962272

    Thank you for providing the screenshots.

    If I understand you well, are you trying to make the portfolio menu item not clickable? just to be there as a placeholder and as you hover you get the drop down of child items?

    yes that is correct, just the below menu items (child item) Id like to be clickable.

    The portfolio menu is on the main nav menu because it has to be there so people can know where the items are.

    From the menus dashboard ( like in the screenshot ), right click on the “Portfolio” item, inspect it, then go through the source code and find the <li id="menu-item-{number}" .. containing that menu, i’d like to know that menu ID..

    Is there what you need to see?!

    link

    Damn WP forum not allowing the screenshot to be seen.

    [moderator note: you might need to add the hyperlink to a word in your topic; i.e. highlight a word, then click the ‘link’ button… fixed in your previous reply]

    Actually, I was going to give you a Jquery code to remove the URL ( href attribute ) for that menu item upon page load, and set it to a hash instead (#), so once clicked nothing would happen. But, I need to know the menu item ID.

    You could right click on Portfolio, inspect element, then provide me a screenshot, so I will look for the item ID..

    here’s the code I am trying to give you, which won’t work without specifying a menu item in the 6th line :

    function edit_menu_href() {
    	?>
    	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    	<script>
    	window.addEventListener('load', function () {
    	   $('#menu-item-{id} a').attr('href', '#');
    	}, false);
    	</script>
    	<?php
    }
    add_action("wp_head","edit_menu_href");

    I have pasted the links of the screen shot, but WP wont allow it to show, its saying: ” I got to slow down”!… Screen shot I hope will be visible soon.

    Try this: remove the http:// before pasting a link, that way it will be plain text and not an anchor..

    example: w.org instead of http://w.org

    I did try to remove it… But seems I cannot lol. Ill have to wait for this I guess.

    I am sorry about that, you have to slow down.
    One last try, put the URL inside 2 backticks ( ` )

    Ill Be here tomorrow Samuel.

    Thank you for your time.

    No worries, you’re welcome 🙂

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Menu item sub category.’ is closed to new replies.