Code Directory
 Visual Basic & VB.NET
New Code
The C# OCR Library 2020.11
SentiVeillance SDK Trial 7.3.2020.11.30
VaxVoIP WebPhone SDK
SentiMask SDK Trial 2.0_193121
C# QR Code Generator 2020.12
How to Read Text from an Image in C# 2020.12
The .Net PDF Library 2020.12.3
fsMediaLibrary.NET 2019.11.0
Entity Developer 6.9.1112
OrgChart JS 7.5.40
LinqConnect 4.9.2096
SSIS Data Flow Components 1.15
IP2Location Geolocation Database Oct.2020
Luxand FaceSDK 7.2
dbForge Data Compare for PostgreSQL 3.3.6
Top Code
OpenGl 3D Effect 1.1
Keno Game 1.I
ERP Application Framework for Delphi 1.0
Azizi search engine script PHP 4.1.10
3D World (OpenGL walk through city) Script 1.1
artridis 1.0
Direx-Directory Dino
i-netsolution School Management Software 1.0.4
Online Poker Script 1.0
Top Rated
Uber Clone with Safety Measure Addons 2.0
Answers phpSoftPro 3.12
phpEnter 5.1.
Quick Maps For Dynamics CRM 3.1
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Apphitect Airbnb Clone Script 1.0
Deals and Discounts Website Script 1.0.2
Pro MLM 1
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
ICPennyBid Penny Auction Script 4.0
PHP Shortcode 1.3
File ID: 93915

PHP Shortcode 1.3
Download PHP Shortcode 1.3http://wordpress.orgReport Error Link
License: Freeware
File Size: 10.0 KB
Downloads: 26
User Rating:1 Stars  (1 rating)
Submit Rating:
PHP Shortcode 1.3 Description
Description: Based on kukukuan's Inline PHP, this plugin allows you to embed and run PHP code in posts, pages or widgets* with a WordPress shortcode.

(* Requires a shortcode enabled widget plugin, such as Section Widget.)

The plugin provides two pairs of shortcodes - [php]code[/php] and [echo]code[/echo]. these two pairs of shortcodes resembles the functionality of the <?php code ?> and <?= code ?> tags in a normal PHP script, respectively.

For example:

The answer to the <em>ultimate</em> math challenge, <strong>1+2</strong>, is...
$a = 1;
$b = 2;

echo $a + $b;

Will become:

The answer to the <em>ultimate</em> math challenge, <strong>1+2</strong>, is...

The [echo] tag will automatically print the returned value of the first expression. Therefore, [echo]some_function()[/echo] is essentially equivalent to [php]echo some_function()[/php].
Some Important Notes

** This plugin will change the priority of the do_shortcode filter. If you are experiencing any conflict with other shortcode plugins, please disable the plugin and report the problem in the forums. **

Although I said the shortcode pairs resembles a <?php code ?> tag pair, there is an important difference. The PHP code in the shortcodes are executed in a "throw-away" local namespace, instead of the global one. All variables defined in a [php] code [/php] block cannot be accessed outside the block. Therefore, this will not work:

$a = 1;
$b = 2;

The answer to the <em>ultimate</em> math challenge, <strong>1+2</strong>, is... [echo]$a+$b[/echo]

And neither would this:

$my_array = array('apple','orange');

foreach($my_array as $fruit):

I like [echo]$fruit[/echo]


To work around the first problem, you may use the global keyword:

global $a, $b;
$a = 1;
$b = 2;

The answer to the <em>ultimate</em> math challenge, <strong>1+2</strong>, is... [php]global $a, $b; echo $a+$b[/php]

And to work around the second problem, you may use "real" PHP closing tags within your [php] code [/php] block to switch between PHP and HTML mode:

$my_array = array('apple','orange');

foreach($my_array as $fruit):

I like <?php echo $fruit; ?>


(Yes, it is a bit weird... you'd probably want to avoid doing that if possible.)


1. Extract the zip file and drop the contents in the wp-content/plugins/ directory of your WordPress installation
2. Activate the Plugin from Plugins page

License: Freeware

Related: Plugin, Answer, ltemgtultimateltemgt, challenge, shortcode, Problem, Block, Global, fphp, shortcodes, pairs, phpthe, foreachmy array, Array, resembles, Scripts, Php, shortcode scripts, php shortcode, php shortcode scripts

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 26

More Similar Code

Allow PHP in posts and pages adds the functionality to include PHP in wordpress posts and pages by adding a simple shortcode [php].code.[/php]

This plugin strips away the automatically generated wordpress <p /> and tags but still allows the addition of your own <p /> and tags

Please update immeadiatly if using version 1.2.2

Install :

1. Extract the zip file and drop the contents in the...

Based on Luke Howell's quote rotator plugin, the flexi quote rotator plugin allows you to add the quotations to your site using a shortcode or php snippet in template instead of only as a widget. Also adds a settings panel to the admin and...

Kazoo Templated Content allows you to use inline templates to program against the WordPress API anywhere you can use a shortcode without PHP.

* Include a custom templated posts loop anywhere.
* Include a custom templated pages...

The Display Posts Shortcode was written to allow users to easily display listings of posts without knowing PHP or editing template files.

Add the shortcode in a post or page, and use the arguments to query based on tag, category, post...

Features at a glance:

* Shortcode for embedding into posts/pages
* PHP function for templating/theming
* Does albums, galleries, or latest pictures
* Supports Nextgen Gallery media-rss.php and its options

The d-deDUMeta Functions Shortcoded-deDt Plugin installs the Shortcode d-de?metad-deOao. With it you can access the custom fields of your articles by a simple shortcode.

Shortcode Syntax: [meta func="" name=""...

Quickly add tables to any post or page using simple shortcode commands.

Installation :

1. Upload quicktables.php to the /wp-content/plugins/ directory
2. Activate the plugin through the 'Plugins' menu in WordPress

Using this plugin you can execute arbitrary PHP code using shortcodes in your posts, pages, comments, widgets and RSS feeds, just like manually defined shortcodes. The shortcodes and associated PHP code are defined using the settings of this...

Creates a shortcode or PHP snippet for inserting dynamic, highly customizable lists of posts or pages into your post content or theme.

Plugin by Kalin Ringkvist at

Plugin URL:...

A flexible shortcode and lookup tool for creating internal links in post/page content (or anywhere shortcodes are parsed). A lookup tool is added to the sidebar of the post edit screen for locating shortcodes for internal posts.


User Review for PHP Shortcode
- required fields

Please enter text on the image