WordPress.org

Ready to get started?Download WordPress

Forums

Colour change of active page (4 posts)

  1. samgreensted
    Member
    Posted 11 months ago #

    Can some one tell me how to change the colour of the font of the active page in the nav bar?

    http://sachastevensonphotography.com/

    Also I'm trying to centre align the logo. Can anyone help me there too?

    Thanks

    Sam

  2. Aditya Pandey
    Member
    Posted 11 months ago #

    First off, setup child theme.
    http://codex.wordpress.org/Child_Themes

    Then add following code in child theme's style.css :

    .current_page_item{
          color: #4d99a9;
    }
    
    #logo {
          float: none;
          text-align: center;
    }

    Change #4d99a9 to desired color.

    This code will change current page color to desired one and will center the logo.

  3. alchymyth
    The Sweeper & Moderator
    Posted 11 months ago #

    the menu seems to be based on 'wp_list_pages()' which outputs a css class .current_page_item on current active page menu items;

    http://codex.wordpress.org/Function_Reference/wp_list_pages

    only the 'home' item seems to be hardcoded without added 'current' class (you would need to edit header.php to change that).

    however, your theme is prepared to work with the custom menu feature;
    consider to activate the custom menu under dashboard - appearance - menus; http://codex.wordpress.org/Appearance_Menus_Screen

    you could try to add some styles like these to style.css to format the active page links:

    .nav li.current_page_item a, .nav li.current-menu-item a { font-style: italic; color: orange; }
    .nav li.current_page_item a:hover, .nav li.current-menu-item a:hover { color: #4d99a9; }
  4. samgreensted
    Member
    Posted 11 months ago #

    Thanks guys. Logo worked but still working on the active page colour.

    Much appreciated.

Reply

You must log in to post.

About this Topic