WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to show a list of all posts without any preview of the content on the homepage?

share|improve this question
remove all the other output codes from index.php or home.php of your theme? - which theme are you working with? – Michael Oct 31 '13 at 10:54
What have you tried? Are you familiar with the WordPress Template Hierarchy? – Chip Bennett Oct 31 '13 at 11:10
@Michael working with the customizer theme from nikeo. I had to dig a bit deep into the functions of class-content-post_list.php but finally found the right ones (2 functions). Still working on the layout atm, but it's getting there :) – Bulki Oct 31 '13 at 13:17
up vote 2 down vote accepted

If the posts are already shown on your page, just with a bunch of unnecessary text that you want to take away, do the following: 1. Open the template file of your homepage (it can be named different in different themes, so impossible to give you the exact name of file, but usually they are named like index.php or home.php). 2. Look for the following bit of code:

<?php while (have_posts()): the_post; ?> // indicates beginning of post loop.
..... // there might be some other lines of code here, but eventually you will find a line that contains:
<?php the_title(); ?> // keep this line
..... // you can start deleting code that follows after the previous line one by one line and see what happens. 
<?php endwhile; ?> // Do NOT delete this line, this indicates the post loop end.

When I experiment with code and feel unsure, I change one thing, save, refresh the page in browser and act according to the result. That way you can always press undo if stuff goes wrong. If you are completely new, I suggest you save a copy of the file you are editing so if everything goes wrong you can just replace the damaged copy with the original file and start over.

Suggested reading: http://codex.wordpress.org/The_Loop

share|improve this answer
This post helped me a lot :) I got the list I wanted, thank you for your help on the matter! – Bulki Oct 31 '13 at 13:14

you can use query_posts in any place you need

<?php query_posts('order=dsc&showposts=6'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php the_title(); ?>
<?php endwhile; ?>
<?php endif; ?>
share|improve this answer
Using query_posts() is inherently bad practice, and also wouldn't at all solve the OP's problem. – Chip Bennett Oct 31 '13 at 11:09
iam not expert but i using it more than 2 times in my website & it is ok with me – adnan Oct 31 '13 at 11:17
Please have a look at this question/answer and this question/answer for full details regarding query_posts(). – Chip Bennett Oct 31 '13 at 11:40
you gave all of it to me before & i read it, but as i told you i using it with no problems thanks my friend – adnan Oct 31 '13 at 11:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.