Change color of a single menu item - by gosztolai.adrienn

This topic has 2 replies, 2 voices, and was last updated 5 years, 9 months ago ago by Rose Tyler

  • Avatar: gosztolai.adrienn
    gosztolai.adrienn
    Participant
    July 9, 2018 at 18:23

    Hello,

    I would like to highlight a single menu item by giving it a different color (not when it’s hovered, or active, just being there). I’ve already tried to add custom css to the Theme Options, but it doesn’t seem to work.

    Could you please help me?

    Thanks,
    Adrienn

    1 Answer
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 10, 2018 at 07:49

    Hello,

    You can use custom css code like this:

    .menu-item-18488 a {
        color: red !important;
    }

    http://prntscr.com/k4lswx
    Please note if you created child theme before 4.0 update you need to add this code in your child theme functions.php file:
    wp_enqueue_style( 'dynamic-css', get_stylesheet_directory_uri() . '/dynamic.css' );
    after that create an empty dynamic.css file in child theme directory.

    Regards

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.