how to display specific post from home page in wp?

<div>
<?php
if (have_posts()) : the_post();
query_posts(‘category_name=Home Pink’);
endif;
//The Loop Below content take your blog theme post coding content start…
if ( have_posts() ) : while ( have_posts() ) : the_post();
?>
<div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>

<h2 style=”margin:0;”><a href=”<?php the_permalink(); ?>” title=”<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyten’ ), the_title_attribute( ‘echo=0’ ) ); ?>” rel=”bookmark”><?php the_title(); ?></a></h2>
<div style=”background:#EF4584;”>
<?php twentyten_posted_on(); ?>
</div><!– .entry-meta –>
<div>&nbsp;</div>
<div>
<?php  home_the_content(); ?>
</div><!– .entry-content –>

</div><!– #post-##  Coding Content End –>
<?php
endwhile;
endif;
?>
</div><!– Green Bg End –>

Reference url :

http://codex.wordpress.org/Function_Reference/query_posts

http://codex.wordpress.org/Template_Hierarchy

Leave a Reply

© 2020 Spirituality