Highlight static blog page link in header

Per your comment:

Because I wanted the freedom to customize the HTML and CSS of the menu. I didn’t want the generated html like: ul or li tags. Plus it gives me freedom to set up my links the way I want them. – blackbull77 20 hours ago

You can do all of that with the output from wp_nav_menu() (except for the generated <ul> and <li> tags of course – but then, those tags are semantically correct since you’re outputting a list). – Chip Bennett 19 hours ago

Could you show how I can go about this? – blackbull77 44 mins ago

  1. Output your list via wp_nav_menu(), referencing the theme_location, like so:

    <?php
    wp_nav_menu( array(
        'theme_location' => 'primary_nav'
    ) );
    ?>
    
  2. Target the .current-menu-item CSS class to style according to your needs

  3. For the default fallback menu, you can also target the .current_page_item CSS class.
  4. To style parent/ancestor menu items, target .current-menu-parent, .current-menu-ancestor, .current_page_parent, and .current_page_ancestor.
  5. To add your own, custom CSS classes, use the nav_menu_css_class filter.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)