WordPress Plugin To Run PHP Scripts In Pages And Posts

There may come a time wherein you will need to have php code run within your posts and pages in your wordpress blog. Luckily there are some plugins available that will let php code get executed within the page or post. Problem is, not all of them worked for me. I tried ExecPHP and runPHP but both of them did not work.

PHP-Exec did the job for me. You can get it here. Remember, take not of the plugin name. It’s PHP first, then Exec next. The plugin Exec-PHP is different. To use PHP-Exec, you would need to add the following tags <phpcode> and </phpcode> between your <? and ?> php code tags.

To use it, say, listing your categories in a page, do the following.

1
<phpcode><?php wp_list_categories(); ?></phpcode>

Donations appreciated. Every little $ helps. Or click Google +1

Related Posts with Thumbnails

11 Responses to “WordPress Plugin To Run PHP Scripts In Pages And Posts”

Pages: « 1 [2] 3 » Show All

  1. 6
    tech Says:

    oh yes. when you do add the code, make sure it is in HTML mode. click the HTML tab

  2. 7
    ayip Says:

    gak bisa mas !!

    - plugin dah aktif
    - di post / page gak bisa
    - Visual/HTML mode ==> tetep gak bisa
    - ==>Gak bisa
    - ==>Gak bisa

    trus biar bisa gimana ?
    btw aku pake WPMU 2.6.5

    thanx

  3. 8
    Php Programmer Says:

    Thanks for the tip! Exactly what I was looking for !

  4. 9
    tech Says:

    you’re welcome. please do rate this post and follow me in google connect and my rss feeds

  5. 10
    suryakant Says:

    Hello Friend,

    I have use this code but it not working.

Pages: « 1 [2] 3 » Show All

Leave a Reply

Spam protection by WP Captcha-Free