Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

How to: Styling Current Page Differently in Menu


  #1  
Old Jan 25, 2013, 06:13 PM
jerryc
 
367 posts · Oct 2012
Florida
Note: I'm using vertical custom menus, so this may work differently in navbar menus.

Out of the box, in custom menus in MZ, if there's a link to the current page, it will be active. I found a plugin called Remove Redundant Links, that did part of what I wanted. Instead of being a link, a link to a current page would be removed, and a title "You Are Here" would appear. The styling stayed the same.

I wanted more. So, I went to the plugin's page and under that plugin clicked edit. Then, I selected the bottom file, remove-redundant-links/class.Remove_Redundant_Links.php. About 2/3 of the way down, I commented out this code:

PHP Code:
/*            // Set title.
            if ( ! $this->settings['title'] )
            {
                unset ( $attr_arr['title'] );
            }
            else
            {
                $attr_arr['title'] = $this->settings['title'];
            }
*/ 
Then, to make the current item in the menu show differently and act more like a breadcrumb, I added the following CSS:

Code:
 ul.menu li.active,
.menu li a.current_page_item,
.menu li a.current_page_item:hover
{
color: #D14200;
font-weight:bold;
border: none;
background: #FFFFFF;
}
Here's the example.
Attached Thumbnails
Click image for larger version

Name:	menu-screenshot.jpg
Views:	401
Size:	2.6 KB
ID:	2192  

Bookmarks

Tags
breadcrumbs, current page, menu, remove redundant links, rrl

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Double highlight in menu bar when blog page is current page strongandfree Page & Category Menu Bars 2 Jul 24, 2011 11:17 AM
[SOLVED] Styling the homepage differently than the single page winsila Forum How-To 2 Mar 24, 2011 06:10 AM
Page menu (pages-widget): Current page item in post unelma Sidebars & Widgets 5 Jun 7, 2010 03:11 PM


All times are GMT -6. The time now is 07:02 PM.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.