Support » Plugin: Flexo Archives » [Plugin: Flexo Archives Widget] Manually placing this widget

  • Resolved mewing22


    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">
         <?php flexo_widget_archives($args); ?>
    <?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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Heath Harrelson


    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 explaining why you want to do this, and I’ll consider adding a standalone version to the code.

    Plugin Author Heath Harrelson


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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Flexo Archives Widget] Manually placing this widget’ is closed to new replies.