Title: New Posts
Last modified: August 19, 2016

---

# New Posts

 *  [pollacap](https://wordpress.org/support/users/pollacap/)
 * (@pollacap)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/)
 * Im trying to figure out through whatever means (php most likely) to figure out
   if a post is X days old and if it is echo a div.
 * I want to make a div appear for new posts to add some information telling the
   user its new, prob. with an image bg of the div.
 * if anyone can help that would be greatly appreciated.

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/new-posts-1/page/2/?output_format=md) 
[→](https://wordpress.org/support/topic/new-posts-1/page/2/?output_format=md)

 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402580)
 * Use query_posts()
 * [http://codex.wordpress.org/Template_Tags/query_posts#Time_Parameters](http://codex.wordpress.org/Template_Tags/query_posts#Time_Parameters)
 *  [powerlinebc](https://wordpress.org/support/users/powerlinebc/)
 * (@powerlinebc)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402596)
 * Hi. I’d like to create one paragraph of each of my new posts on my mainpage, 
   then have the reader continue to another page by adding a “read more” link. This
   way I can have a number of recent posts on the main page and not have it full
   with one long post. How do I do this?
 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402599)
 * Change the_content to the_excerpt in index.php of your theme.
 *  [powerlinebc](https://wordpress.org/support/users/powerlinebc/)
 * (@powerlinebc)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402611)
 * OK, I’m kinda new at this. where do I find that?
 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402613)
 * in index.php of your theme
 *  [Maiskolben](https://wordpress.org/support/users/maiskolben/)
 * (@maiskolben)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402614)
 * in your ftp client with root access, then the path where do you uploaded your
   wp. -> root/wp-content/themes/THEMENAME/
 *  [powerlinebc](https://wordpress.org/support/users/powerlinebc/)
 * (@powerlinebc)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402616)
 * Ok, thanks.
 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402617)
 * If you don’t have FTP software or don’t know how to use it, you can do it with
   the theme editor in WordPress. Appearance > Editor
 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402621)
 * p.s. Always make a backup in case it gets screwy and has to be put back to the
   way it was. If you are using the WP theme editor you can copy the code into a.
   txt file and save it just in case.
 *  Thread Starter [pollacap](https://wordpress.org/support/users/pollacap/)
 * (@pollacap)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402632)
 * hmm,ok.
 * I want my current functions to work as normal, but, for posts that i have posted
   within the past 4 days i want to echo a div on the frontpage.
 * For instance, all posts 3 days old i want it to echo a div saying NEW!
 * From the link you gave me it seems to just call the entire post.
 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402640)
 * I think you would have to add a [Conditional Tag](http://codex.wordpress.org/Conditional_Tags).
   You can combine a conditional tag with a query. Unfortunately I can’t figure 
   out the exact code for you because it would take me some time.
 *  Thread Starter [pollacap](https://wordpress.org/support/users/pollacap/)
 * (@pollacap)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402643)
 * i have a script, i just dont know how to call it in the index.php
 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402648)
 * If it’s in a separate file in your theme folder (let’s say it’s named yourfile.
   php), use
 * <?php include(TEMPLATEPATH.’/yourfile.php’);?>
 *  Thread Starter [pollacap](https://wordpress.org/support/users/pollacap/)
 * (@pollacap)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402649)
 * its a php script in functions.php, is there a way to call it from the title or
   something?
 * > function childtheme_post_header(){
 * can i call that by using
 * > <?php postheader (); ?>
 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/#post-1402650)
 * Sorry I don’t know. That’s not how I would do it.

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/new-posts-1/page/2/?output_format=md) 
[→](https://wordpress.org/support/topic/new-posts-1/page/2/?output_format=md)

The topic ‘New Posts’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [new](https://wordpress.org/support/topic-tag/new/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 17 replies
 * 5 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/new-posts-1/page/2/#post-1402766)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
