The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Styling current post link in sidebar (1 post)

  1. betobonix
    Posted 8 years ago #

    In my current WP project I have a list of posts on the sidebar, but I wish to style the current open post link on the sidebar. Is there a way to insert a class to the link of the current open post in the sidebar? I am trying to make it looks like the hover that it haves.

    You can find the post list in this link: http://kiwimidia.com/pino/?cat=4

    I am using the following code to list the post titles in the sidebar:

    	global $post;
    	$myposts = get_posts('numberposts=20&offset=0&category=3');
    	foreach($myposts as $post) :
           <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
           <?php endforeach; ?>

    I´ve been trying to find some old resolved topic but nothing quite like this.

    Thank you for the help

Topic Closed

This topic has been closed to new replies.

About this Topic