Can anyone please help me out with this? How can i make recent post style like this? Check the picture. Thanks in advance
I do not know how to do the styling (you must look in the source code). This is the code which generates a list of 5 recent posts: <ul> <?php $myposts = get_posts('numberposts=5&offset=0&category=0'); foreach($myposts as $post) : setup_postdata($post); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endforeach; ?> </ul> PHP:
Well, I cannot help you without the URL. I do not have a crystal ball. (Maybe someone else could, but who would bother if you can just copy it from the original page exactly how it is displayed?)
I cannot give you the code if the style isn't there. Take a look at this: http://www.css3.info/preview/rounded-border/
you need to edit CSS of your current theme. if you don't know how to this, then you need to learn it.
This style should do the job. <style> li{ list-style-type:none; background:#fffff; border: 0.1em solid #0F97DB; -moz-border-radius:4px; padding:0.5em; margin:0.5em; } </style> <ul> <li><a href="http://www.techmaish.com/the-latest-in-networking-technology/" title="The Latest in Networking Technology">The Latest in Networking Technology</a></li> <li><a href="http://www.techmaish.com/best-branding-for-your-business/" title="Best Branding For Your Business">Best Branding For Your Business</a></li> <li><a href="http://www.techmaish.com/social-media-mistakes-to-be-avoided-by-pr-pros/" title="Social Media Mistakes to be Avoided by PR Pros">Social Media Mistakes to be Avoided by PR Pros</a></li> <li><a href="http://www.techmaish.com/advantage-over-competitor-with-internet-marketing/" title="Advantage Over Competitor With Internet Marketing">Advantage Over Competitor With Internet Marketing</a></li> <li><a href="http://www.techmaish.com/most-epically-massive-photos-ever-taken/" title="Most Epically Massive Photos Ever Taken">Most Epically Massive Photos Ever Taken</a></li> </ul> HTML:
If you save the code in a file and open in a web browser, you can see that it styles the <li> elements. Just assign an ID (for example "coollist") to the <ul> to the list of recent posts and then rename the style class to #coollist li.