WordPress.org

Ready to get started?Download WordPress

Forums

Flexo Archives
[resolved] Manually placing this widget (3 posts)

  1. mewing22
    Member
    Posted 3 years ago #

    I need to manually place this widget instead of using the WordPress widget interface. I've tried the code below, and it almost works, but it prints an error. I don't know much about PHP. Can someone give me the right code to use for this plugin?

    <?php if (function_exists('flexo_widget_archives')) { ?>
      <div class="widget_archives">
        <ul>
         <?php flexo_widget_archives($args); ?>
        </ul>
      </div>
    <?php } ?>

    Gives this error: "Warning: extract() [function.extract]: First argument should be an array in ... /wp-content/plugins/flexo-archives-widget/flexo_archives_widget.php on line 116"

    Please help.

    http://wordpress.org/extend/plugins/flexo-archives-widget/

  2. Heath Harrelson
    Member
    Plugin Author

    Posted 3 years ago #

    This isn't working because the flexo_widget_archives() function is expecting to get arguments from the widget system in the $args array. It calls extract($args), which accounts for the error you're seeing ($args is probably null, unless you're setting it).

    To make this work, you'd have to replicate the contents of the $args array yourself and get the right script tags into the header of your theme.

    I'm the author of the widget, and I've gotten a couple of previous requests to do a standalone version. Send me an email at heath.harrelson@gmail.com explaining why you want to do this, and I'll consider adding a standalone version to the code.

  3. Heath Harrelson
    Member
    Plugin Author

    Posted 3 years ago #

    Just noting for the Internet at large that I have added this feature to version 2.0.3 of Flexo Archives.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic