HTML

PHP is a powerful scripting language and there are many powerful plug-ins available. One of them is GD, which can be used to create images on the fly. GD, originally developed by Thomas Boutell by far is the most popular image-processing library for PHP (it is also available for other languages like Perl). GD has […]

I am using WordPress 2.9 for this example: Open Appearance -> Editor. Locate the php file that is being used to display categories.  It’s either Archieves.php or Categories.php.  You can echo something and open up a category page in the browser to see which one is being used. You can also edit the file in […]

There are built in library to do RSS Feeds, but won’t it be nice to build our own and be able to customize the output.  PHP 5 or later is needed for this method because it uses SimpleXML. Below are some useful links that we use in this tutorial. SimpleXML overview and example: https://permadi.com/blog/2010/02/parsing-xml-in-php-using-simplexml/. SimpleXML […]

There are several method to parse XML data using PHP, one of them is using SimpleXML. SimpeXML requires PHP 5 or better but is one of the easiest way to parse XML in PHP, you can use object notation to refer to nodes. The SimpleXML API documentation is here: http://us3.php.net/manual/en/book.simplexml.php Example 1 Here we show […]

Here are some plug-ins that enables execution of PHP code within a WordPress post (I am using WordPress 2). http://wordpress.org/extend/plugins/exec-php/  Read this if it doesn’t work: https://permadi.com/wordpress2/wp-content/plugins/exec-php/docs/readme.html#execute_php http://www.nosq.com/blog/2006/01/runphp-plugin-for-wordpress/ http://www.hongkiat.com/blog/execute-php-in-wordpress-post-page-and-widget-sidebar/ For these to work, it’s best to use the HTML editor when editing posts, not the Visual editor.  I also find that toggling ftom HTML to Visual […]

Showing A Page Element Sometimes Only I am facing a situation where when an user opens and ad, I wanted to show an interstitial advertisement sometimes, but not all the times, say only 50 percent of the time.   This is actually quite easy to do, but you should at least know PHP and be comfortable […]