Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #338670

    Hi All,

    Any quick ideas on how to fix this?

    I’ve created a website that is loosely based on a one-page theme, so the main menu items link to a anchor points on the first page. However, some links within the page do you go off to new pages so I’ve had to do some funny things with the main menu such that it works in all circumstances. I created a main menu with both types of links in and then I use the plug-in called “Page Specific Menu Items” so I could cherry pick which links I wanted on the main menu for each page. This works great apart from one thing, if you use the in page search on the menu the search results page has double the amount of links in because it’s showing all links defined in the main menu. Is there a way to prevent this?

    Here’s the site: http://www.uxlabs.co.uk to see what I mean use the search, and look at the main menu on the search results page.

    #338895

    Hi robwheatley!

    Thank you for using Enfold.

    I’m sorry but what do you mean by “in page search”? Can you please give us an example keyword so that we can reproduce the issue? have you tried using the zen menu logic plugin? https://wordpress.org/plugins/zen-menu-logic/

    Cheers!
    Ismael

    #338932

    Hi Ismael,

    I was in a bit of a rush when I posted that and I probably didn’t describe things very well.

    By in page search, I mean’t using the search icon on the top right of the page. Search for anything and when the search results come back, you will see that the main menu has a double entry in (my full main menu, unfiltered because I’m not sure how I can employ the “Page Specific Menu Items” plugin to the search results page).

    I’ve not tried that plugin you mentioned, but the one I am using is similar in that it allows you to adjust the main menu on a per page/post basis. The problem is that the search results page isn’t a page or post of mine, so I don’t have control (do I?).

    Rob.

    #340734

    Hi!

    This code will remove the additional menu items, add it to the Quick CSS:

    .menu-item-type-custom, .menu-item-object-custom {
    display: none;
    }

    Cheers!
    Andy

    #340760

    Hi Andy,

    That removes the ‘extra’ menu items, but I need them on some pages. Is there a way to do this just for the search results page?

    Background:
    My main menu has most things listed in it twice. On a per page basis, I show one or the other. On the home page, the item links to a # on the page, e.g. on the Home page, clicking on Clients in the main menu goes to #Clients a bit lower down in the home page. When there, clicking on one of the clients, will take you to a more detailed page /clients. Now, on this page, the main menu has the same items in, but the links go to different pages (I can’t use the anchors anymore as they only exist on the home page).

    On each page, I can control what menu items I display (from my 2x list). But I can’t control the search page. The CSS you mentioned, sorts out the search page, but breaks the other pages….

    #342576

    Hey!

    Try with this:

    .search .menu-item-type-custom, .search .menu-item-object-custom {
    display: none;
    }

    Cheers!
    Josue

    #342649

    Spot on!

    Thanks Josue.

    (I really should have worked that one out myself!)

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Page specific menu items and the search results page’ is closed to new replies.