Grow your CSS skills. Land your dream job.

Starkers Theme: class=”current_page_item”

  • # May 17, 2013 at 12:04 pm

    Hi All. I know Chris used Starkers Naked theme in his video tutorials so I’ve been using it too. I came to a hiccup where I want the link to stay active when someone clicks onto a new page. I added in my style.css the following code.

    .current_page_item {
    color:#ff3366;
    text-decoration:none;
    }

    since my website generates the code in browser (I had to take out the brackets because the “code” link to be able to copy/paste in code wasn’t working – sorry for the inconvenience):

    ul id=”menu-main-nav-menu” class=”menu”

    li id=”menu-item-53″ class=”menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-38 current_page_item menu-item-53″

    a href=”#” About Us
    /a
    /li

    li id=”menu-item-49″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-49″

    a href=”#”Work
    /a

    /ul

    Technically, it should work, but it doesn’t. Can anyone tell me the exact code i need to input into my functions.php and any other files to get this to work?

    Thanks in advance~!!!

    # May 17, 2013 at 12:27 pm

    The color is probably being declared on the anchor inside of the list item. You’ll want to do this instead:

    .current_page_item a { color:#ff3366; text-decoration:none; }

    Also, if you want your code to show in the forum, you can do it `inline` by using backticks (“) around the code or if you want blocks, just make sure to indent by four spaces (or select all of your code and hit the ‘Code’ button above the editable `textarea`.

    # May 17, 2013 at 12:39 pm

    OMG Thank you!!!! It worked! I was struggling with this since yesterday and did so many google searches, wp forums, etc! Thank you again The Doc!!!

    Best Regards!

    # May 17, 2013 at 12:43 pm

    No problem!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".