Welcome IP: 68.110.94.4

Making a WordPress post template

Send this article to a friend Send this article to a friend

Do you publish WordPress posts on a regular basis which use the same structure? Maybe you have a signature or picture you would like to add to every post? You can eliminate the time spent going back and forth between posts doing copy and paste functions by simply creating a post template. A post template can automatically add text, images or code to every new post you create. Currently, I don't use a WordPress post template on this site. However, I have set it up for others who use specific images and signatures that need to be added to the content of every post.

Creating a WordPress Post Template:

  1. FTP to your server and download the edit-form-advanced.php file from your wp-admin/ directory
  2. Open edit-form-advanced.php file with a text editor
  3. Find the following line
    PHP:
    1. <?php the_editor($post->post_content); ?>

  4. Above that line add the following
    PHP:
    1. <?php
    2. if (empty($post->post_content)) {
    3. $post->post_content = "Your Text or Code goes Here" ;
    4. }
    5. ?>

  5. Replace "Your Text or Code goes Here" with your own text, images, code, etc to be added to all new posts
  6. Save the changes to the edit-form-advanced.php file and upload it back to your server overwriting the original file
  7. Login to your WordPress admin panel and write a new post. Your text, images or code should automatically be included in the post.

Related posts


                            

If you find this information useful, feel free to express your support via a quick PayPal Donation: