Adding PHP to widgets (4 posts)

  1. carmen101
    Posted 9 years ago #

    I've downloaded a plugin that requires that to my template, I add the code <? if (function_exists('chicklet_creator')) { chicklet_creator(); } ?>

    I'd prefer not to add it to my template. Is there not a way to add this to a widget and then just drag and drop the widget to where I want this code to appear.

    I did try it but when I view my site, the plugin information did not display anything on my website.

    Thank you for your help.


  2. carmen101
    Posted 9 years ago #

    forgot to mention above, I added the above code to a text widget.

  3. drmike
    Posted 9 years ago #

    Why not just write a widget for it?


    Or fine a simple pre existing widget and modify it?

  4. MichaelH
    Posted 9 years ago #

    Otto's phpexec widget is pretty easy to use:

    If you are using 2.2, make sure you get his widgets.php fix that is listed in the comments of the post I linked above.

Topic Closed

This topic has been closed to new replies.

About this Topic