Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

i want to display all posts as well as count the days of the post since it was published

if ($pageposts):
  foreach ($pageposts as $post):
        setup_postdata($post);
    echo '<p>';

   the_title();

   echo '</p>';
  endforeach;
endif;

Output should be something like this

Post Title1 - This post is published 4 days ago Post Title2 - This post is published 3 days ago Post Title3 - This post is published 6 days ago

and at the same time i want to delete the post once it reaches 10 days

I really need your help guys thanks i appreaciate it alot

share|improve this question
add comment

3 Answers

There's a small thread in WordPress support for this question, they recommend two plugins, Post Expirator and Auto Prune Posts.

share|improve this answer
add comment

check this tutorial - WordPress: make posts expire or auto-delete

share|improve this answer
1  
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. –  Wyck Aug 19 '12 at 0:52
add comment

Your Answer

 
discard

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.