Support » Plugin: Flexible Posts Widget » Current nav item highlighted?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Nevermind, I figured it out.

    If anybody needs to do this:

    Add this to your header:
    <script src=”//”></script>

    <script type=”text/javascript”>

    // Get current url
    // Select an a element that has the matching href and apply a class of ‘active’. Also prepend a – to the content of the link

    var url = window.location;

    $(‘a[href=”‘+url+'”]’).parent(‘.dpe-flexible-posts li’).addClass(‘highlight a’);


    and then this to your css:
    .dpe-flexible-posts li.highlight a,
    .dpe-flexible-posts li.highlight a:visited {
    color:#339933 !important;

    Plugin Author DaveE


    Hi gloriagoldrea,

    Thanks for posting this issue and a possible solution. I’m looking at what it would take to add that CSS class programmatically. I’ll post back to this thread if a future release adds this capability.

    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Current nav item highlighted?’ is closed to new replies.