Colour change of active page (4 posts)

  1. samgreensted
    Posted 3 years ago #

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


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



  2. Aditya Pandey
    Posted 3 years ago #

    First off, setup child theme.

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

          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. Michael
    Forum Moderator
    Posted 3 years 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;


    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
    Posted 3 years ago #

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

    Much appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic