Forums

Function will not run from widget text box (3 posts)

  1. bobjones
    Member
    Posted 1 year ago #

    I'm trying to run simple functions as simple Text widgets to display archives or categories. But nothing will display on the blog.

    For example, I selected an empty Text widget from Available Widgets and pasted in this function:
    <?php wp_get_archives(); ?>

    But instead of displaying archives, the blog doesn't show anything. I checked the source code and saw just a repeat of the function script:
    <?php wp_get_archives(); ?>

    All my other widgets are working fine and functions run just fine in any non-widgetized areas of the blog.

    Any idea how I can fix the problem?

  2. alchymyth
    The Sweeper
    Posted 1 year ago #

  3. bobjones
    Member
    Posted 1 year ago #

    Thanks so much, alchymyth. I suspect many others have wasted untold hours on this problem and never found a solution.

    The first two plugins I tried were broken, but otto's PHP Code Widget is the ticket:

    http://wordpress.org/extend/plugins/php-code-widget/

Topic Closed

This topic has been closed to new replies.

About this Topic