Call php file within a wordpress posts?

JJohn

Junior Member
Joined
Nov 2, 2009
Messages
138
Reaction score
18
Im not sure if this is possible, to me it should be but I don't know how.
I know there is a plugin that allows you to run php code within wordpress posts...but this is not what I want. I don't want a plugin, and I don't need to type php code in my posts.

I have a php file like mycode.php on my server, and within certain wordpress posts, I just wanna call that file so it runs the php file...how do I do it? In the HTML view, can I just link in someway to that php file? Is what I am asking even possible?
 
Edit your theme, call it from there (before or after showing the posts).
 
Im not sure if this is possible, to me it should be but I don't know how.
I know there is a plugin that allows you to run php code within wordpress posts...but this is not what I want. I don't want a plugin, and I don't need to type php code in my posts.

I have a php file like mycode.php on my server, and within certain wordpress posts, I just wanna call that file so it runs the php file...how do I do it? In the HTML view, can I just link in someway to that php file? Is what I am asking even possible?

Use that plugin to run php code in your post.

In your post do this:

Code:
<?php
include '/path/to/script/to/run.php';
?>
 
Anybody knows how to do this in free wordpress blogs ?
 
Back
Top