Title: Plugin works fine except php
Last modified: September 2, 2016

---

# Plugin works fine except php

 *  [kingbolo](https://wordpress.org/support/users/kingbolo/)
 * (@kingbolo)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/plugin-works-fine-except-php/)
 * In the post template I use php code to display the posts from a specific category
   in a post.
    So in a post (lets call that mainpost) the posts of category A should
   be displayed (we’ll call them subposts) This works fine except that when I add
   an new subpost in that specific category it does not get added to the mainpost.
   For that I have to go to the excisting mainpost and load the post template again.
   But then a new mainpost is created instead of updating the excisting.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Clifton Griffin](https://wordpress.org/support/users/clifgriffin/)
 * (@clifgriffin)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-works-fine-except-php/#post-7751424)
 * Hi Edwin,
 * This seems like a misunderstanding about the purpose of PHP in templates. The
   PHP is supposed to run on template load, not each time the post is loaded.
 * If you need dynamic content in a post, you are probably going about it the wrong
   way. I’d use the WordPress template system to accomplish this.
 * Clif

Viewing 1 replies (of 1 total)

The topic ‘Plugin works fine except php’ is closed to new replies.

 * ![](https://ps.w.org/simple-post-template/assets/icon.svg?rev=2425232)
 * [Simple Content Templates for Blog Posts & Pages](https://wordpress.org/plugins/simple-post-template/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-post-template/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-post-template/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-post-template/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-post-template/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-post-template/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Clifton Griffin](https://wordpress.org/support/users/clifgriffin/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-works-fine-except-php/#post-7751424)