Jump to content
Sign in to follow this  
jingram

non clickable parent objects in navigation menus. # causes 404 when used with custom permalinks?

Recommended Posts

jingram    1
jingram

So here is the deal. I have some navigation menu parent objects that I want to be unclickable and yet still have clickable child objects. In the old days, in Wordpress, I would simply create a custom menu and use that as the parent objects and then blank the url. Then I would link whatever child objects I wanted via their pages and put them in the order I wanted. A couple of releases of wordpress back, this stopped working. Well, it worked fine, but it broke the style of the menu. See this link here. http://www.pagelines.com/forum/discussion/16164/iblogpro-4-blue-color-theme-messed-up-post-3.3-update#Item_7 Danny recommended putting in # as my option instead and that took care of it. However, with my last wordpress upgrade it appears that those items are now clickable again and it takes you to a 404 error page. When you put the # in the custom menu it looks like it creates a link back to this:

http://www.adventurekayaking.org/<?php echo get_settings('home'); ?>#

So after much investigation and troubleshooting, it appears that this is being caused by custom permalinks. When we switch back from custom permalinks to default it seems to work fine. We aren't doing anything too crazy here. Our custom permalinks being used are below. /%post_id%/%category%/%postname%/ Any ideas?

Share this post


Link to post
Share on other sites
Simon    247
Simon
You are putting php into the menus?

Share this post


Link to post
Share on other sites
Rob    547
Rob
I tested this setup with the exact custom permalink you stated, added a parent with # in the URL field, then a child below it. I saw no down arrow for the child menu items but I did not see the php. When clicked, it the tested parent did nothing. A bug report was submitted.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Rob    547
Rob
Go to Dashboard > iBlogPro > Theme Options > Header And Nav... there you'll see a check box for Drop Down Navigation. Check it and your menu will work. Thank you Simon for a brilliant job of deduction!

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
jingram    1
jingram
Take a look at the site guys... NO php is not in the menus and YES sub menus work fine. I've been using iBlog4 Pro for over a year now. I'm not totally new to this stuff, lol. When you hover over the parent menu I see the php code included above meaning that is what the menu is trying to link to. When you click on the parent link it returns the 404 page. However, that only happens when you use custom permalinks as stated above. When you use default permalinks it does nothing and stays on the current page like it is supposed to.

Share this post


Link to post
Share on other sites
jingram    1
jingram
For example, on the site, the first Parent Menu Item is Trips and Adventures. Right now this is a custom menu and is setup to point to # When you click on that parent menu it returns a 404 and the page it is returning the 404 against is the link/code snippet I included above. Again, this only happens with the custom permalinks I specified above. If you switch to default permalinks everything works fine.

Share this post


Link to post
Share on other sites
Simon    247
Simon
Take a look at the page source, you will see this: [code]

Share this post


Link to post
Share on other sites
jingram    1
jingram
So what do you think is happening?

Share this post


Link to post
Share on other sites
Simon    247
Simon
Well, you have added the above piece of code somewhere expecting it to be parsed as php, when it isnt. I have no idea where you added it.

Share this post


Link to post
Share on other sites
jingram    1
jingram
I can tell you that I definitely didn't add it... would a plug-in do this? Why would the issue go away when switching to default permalinks? On another note, it only seems to impact Chrome and Firefox. IE9 does nothing. Behavior as expected.

Share this post


Link to post
Share on other sites
Simon    247
Simon
could be a plugin, i have no idea.

Share this post


Link to post
Share on other sites
jingram    1
jingram
Well I stand corrected, I found the code buried in the http header scripts section. Looking back through some cases I had opened up about my original challenge with non clickable parent menu items it appears that the old method use to be going custom, blanking out the url for the menu item and inserting said code in the header scripts section. Thanks for brainstorming this with me guys, much appreciated. Feel like a bit of a tool, but such is life I suppose. It makes it challenging when the behavior is so erratic across platforms and when seeminly unrelated things like the permalinks changes produce the desired behavior.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×