Basic CSS rules for development of WordPress themes

Whenever you are developing the new wordpress theme, you need to put some css in your style.css file. If you are not adding that css in your theme then there is lot of changes to break your theme view. Some … Continue reading

How to set Media Icons in wordpress theme

Just put some jpg, png or gif files in your theme images folder. your_theme/images/audio.jpg your_theme/images/audio.gif your_theme/images/audio.png your_theme/images/mpeg.jpg your_theme/images/mpeg.gif your_theme/images/mpeg.png your_theme/images/audio_mpeg.jpg your_theme/images/audio_mpeg.gif your_theme/images/audio_mpeg.png Whenever you are putting the media files in post above icons will appear in your theme.

How to display most recent post from a category

Use following code for showing the recent post from category: <?php query_posts(‘showposts=1&cat= get_cat_id(‘category_name’)’); while(have_posts()) : the_post(); ?> <h3><a href=”<?php the_permalink() ?>” rel=”bookmark”><?php the_title(); ?></a></h3> <?php the_content(); ?> <?php endwhile; ?> You can replace the category_name to your category name