Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress theme Active page help

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #45085
    iamRDM
    Participant

    hey guys I’m new to wordpress theme development and having problem with active page.

    this is code of my header.php
    Please help me how to do this :)

    >

    <?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>

#137577
iamRDM
Participant

code in next post -_-

#137578
iamRDM
Participant

here is the codepen link to my header.php file
http://codepen.io/iamrdm/pen/sfykA

#137723
iamRDM
Participant

What i want is that When Home page is open the “Home” option in navigation bar should be highlighted
when Contact page is open the “Contact” option should be highlighted

#137726
Watson90
Member

Hi @iamRDM

To get this to work with my [website](http://stevenwatson.co.uk/about “”), I had to add a class to my CSS file called;

`current_page_item` and add the styles within this, I however used the Starkers Barebones theme.

Hope this helps…

#137774
sayedtaqui
Member

Watson is right, wordpress adds a default class “current_page_item” to the current page, So you can write your css for it.

#137937
iamRDM
Participant

Thanks for the Help guys. It worked :)

#137938
Watson90
Member

Good to hear :)

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Back End’ is closed to new topics and replies.