PHPInclusion WordPress Plugin
Posted in WordPress and tagged with PHPInclusion, WordPress plugin on 10/26/2008 02:59 pm by adminPHP File Inclusion in posts & pages using require, include or similar statements.
PHPInclusion Wordpress plugin allows you (admin only) to insert the content of a php file into your post/ page with include(), require() , require_once() and include_once() functions.
Usage:
[include:Path/To/MyPhpFile.php]
[include_once:MyPhpFile.php]
[require:MyPhpFile.php]
[require_once:MyPhpFile.php]
Installation
1) Download plugin and unzip.
2) Upload the plugin file to your WordPress plugins directory inside of wp-content : /wp-content/plugins/
3) Activate it from the plugins menu inside of WordPress Admin.
4) Past PHPInclusion code into your post/page.
Download Plugin
Online Demo
Online Demo : My sitemap
1. create a php file called sitemap.php
2. copy and paste this code into sitemap.php
<h2>Posts</h2><hr />
<ul>
<?php
global $post;
$args = array(
'post_type' => 'post',
'numberposts' => -1,
'post_status' => null,
'post_parent' => null, // any parent
'order' => 'DESC',
'orderby' => 'date'
);
$myposts = get_posts($args);
foreach($myposts as $post) :
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
<h2>Pages</h2><hr />
<ul>
<?php
$args = array(
'post_type' => 'page',
'numberposts' => -1,
'post_status' => null,
'post_parent' => null, // any parent
'order' => 'DESC',
'orderby' => 'date'
);
$myposts = get_posts($args);
foreach($myposts as $post) :
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
3. add this code into a post or page:
[include:sitemap.php]
Online Demo : My donations page
1. create a php file called donation.php
2. copy and paste your paypal code into donation.php file
3. copy and paste this code into a page or post:
[include:donation.php]
Plugin Version
1.1
Author
Roya .K


February 13th, 2009 at 10:11 am
[...] : [include:Path to your php file] [include_once:Path to your php file] [require:Path to your php .....read more Download Plugin! Version 1.0 Last Updated: October 27, 2008 Plugin Owner: Roya Khosravi [...]
March 13th, 2009 at 11:32 pm
[...] into your post/page with include(), require() , requireonce() and includeonce() functions… …..read more Download Plugin! Plugin Owner: Roya Khosravi Homepage: Visit Plugin’s Website Version 1.1 [...]
August 28th, 2009 at 2:31 pm
[...] more here: Roya Khosravi » Blog Archive » PHPInclusion WordPress Plugin Comments0 Leave a Reply Click here to cancel [...]