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

  • remove all the other output codes from index.php or home.php of your theme? - which theme are you working with?
    – Michael
    Oct 31, 2013 at 10:54
  • What have you tried? Are you familiar with the WordPress Template Hierarchy? Oct 31, 2013 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, 2013 at 13:17

2 Answers 2


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

  • This post helped me a lot :) I got the list I wanted, thank you for your help on the matter!
    – Bulki
    Oct 31, 2013 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; ?>
  • 2
    Using query_posts() is inherently bad practice, and also wouldn't at all solve the OP's problem. Oct 31, 2013 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, 2013 at 11:17
  • Please have a look at this question/answer and this question/answer for full details regarding query_posts(). Oct 31, 2013 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, 2013 at 11:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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