Forums

Selectively Disable Page Linking in Menu (3 posts)

  1. Zephbane
    Member
    Posted 1 year ago #

    So, I've been doing some extensive researching about this topic, and there seems to be lots of help and answers out there. But I believe the reason I haven't been able to fix my problem is because of the theme I am using (Piano Black 2.2 by mono-lab) The php code for this theme seems a bit more complex than others... Although, I have a very limited knowledge of php, so I'm probably wrong :)

    So, I want to disable the linking of some particular pages (used in the top menu). As I said above, I've been trying various ways based on others suggestions, but none of them are working.

    I tried adding the pageid's that I dont want clickable to the following in the header.php

    ?php
             if($options['header_menu_type'] == 'pages') {
             wp_list_pages('sort_column=menu_order&depth=0&title_li=&exclude=797' . $options['exclude_pages']);
             } else {
             wp_list_categories('depth=0&title_li=&exclude=' . $options['exclude_category']);
             }
       ?>

    But when I do this, the entire page is excluded from the menu (so the children pages are visible and all out of order...)

    Any php guru's out there willing to lend a few moments to help? :)
    My site for reference: http://banedesigns.gamingisstupid.com

  2. Zephbane
    Member
    Posted 1 year ago #

    Bah! Please ignore the 797 in the php reference, its just suppose to be 797, was trying to make it bold so you could see where I added the page id :)

  3. Zephbane
    Member
    Posted 1 year ago #

    Update:

    So I've been trying various plugins, and they do as they describe (unlinking the page). But when used, it messes with the formating of the theme (the page text in the menu is no longer centered - it appears at the very top of the menu box).

    Also, as I was experiementing with these plugins, I noticed that I lose the mouseover functionality if it is unlinked. Meaning, the text no longer changes color - If at all possible, this is something that I would like to keep.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.