I would like to show just 1 STICKY post on my home page, but have archives set as in the ‘Reading’ Settings.
I found the following code in the forum, however, it does show only 1 post, but unfortunately, my page also shows in addition, the sticky post I set.
<?php get_header(); query_posts('posts_per_page=1'); ?>
I also found this code to show only sticky posts, however, only 1 post shows in archives as well.
<?php query_posts(array('post__in'=>get_option('sticky_posts'))); ?>
How can I make this code, or other code, just show 1 sticky post on my Home page, yet leave the ‘Reading’ Settings for archives?
- The topic ‘Single Post on Home Page’ is closed to new replies.