Laxman Prajapati
Friday 7 March 2014
Wednesday 14 August 2013
How to display specific category post in wordpress
$category = get_the_category();
if($category[0]){
echo '<a href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'</a>';
}
query_posts('showposts=1&cat=3');
while(have_posts()) : the_post();
?>
<ul>
<li><h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<ul><li><?php the_content(); ?></li>
</ul>
</li>
</ul>
<?php endwhile;?>
if($category[0]){
echo '<a href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'</a>';
}
query_posts('showposts=1&cat=3');
while(have_posts()) : the_post();
?>
<ul>
<li><h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<ul><li><?php the_content(); ?></li>
</ul>
</li>
</ul>
<?php endwhile;?>
Friday 5 July 2013
What is wordpress ?
WordPress is an open source CMS, often used as a blog publishing application powered by PHP and MySQL. It has many features including a...
Subscribe to:
Posts (Atom)