Wordpress - Inserting PHP into posts

This is a bit of a test to see whether php can be included using the Exec-PHP plug-in. If it works, then we will have the ability to add content that is fully indexable by the search engines.

The plan is to add an Affilistore content unit here, but using the PHP version of the output code. There is a complexity, as the Visual editor risks corrupting the code, converting the php tag into something meaningless

Therefore I am using a separate plugin Deactivate Visual Editor. Let’s see if it works.

Hopefully below (or following the rest of the post), you will see a selection of driving experiences drawn from one of my Affilistores.

Aston Martin Thrill Days


Annual Supercar Club Membership
Annual Supercar Club Membership
£10800.00
Buy Now

Supercar For The Weekend
Supercar For The Weekend
£1650.00
Buy Now

Classic Car For The Weekend
Classic Car For The Weekend
£1200.00
Buy Now

Eurochallenge Supercars For Two
Eurochallenge Supercars For Two
£950.00
Buy Now

Ultimate Racetrack Driving Day
Ultimate Racetrack Driving Day
£799.00
Buy Now

Ultimate Track Day
Ultimate Track Day
£799.00
Buy Now

Ultimate Track Day
Ultimate Track Day
£799.00
Buy Now

Euro Challenge Driving Experience At Prestwold Hall For Two
Euro Challenge Driving Experience At Prestwold Hall For Two
£795.00
Buy Now

Sports Car Treasure Hunt For Two
Sports Car Treasure Hunt For Two
£685.00
Buy Now

Well, there is the answer!! All these experiences are lifted from my Gifts & Experiences store. Only puzzle … what happened to the £ currency symbol? I have triesd substituting £ in my Affilistore config too without success.

If anyone knows how to replace those horrid little boxes, then I will be grateful to know how.

(Update: I hacked conentunit.php and replaced .$content['prodCurrency']. with .’& pound;’. (without the space between & and pound. This will only work for a single currency store, replacing with your own currency symbol).

Yes, it is possible to embed php inside of a wordpress page or article. The downside is that you need to handcraft your HTML within it.

3 Responses to “Wordpress - Inserting PHP into posts”

  1. Kramer auto Pingback[...] of the content units work and not the php …..PHP version does work in the right place …. see here where I have inserted a php content unit into a Wordpress article with the support of [...]

  2. Kramer auto Pingback[...] is this? From this page you can use the Social Web links to save Wordpress - Inserting PHP into posts to a social bookmarking site, or the E-mail form to send a link via [...]

  3. Kramer auto Pingback[...] discussed techniques on the main blog whereby you can include content from your Affilistore … see this blog entry Affiliate Websites : Food with Passion - Kitchen Goods & AppliancesSatellite Navigation | GPS [...]

Leave a Reply