The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Flexo Archives
Add Parameter to Return Instead of Echo Results (1 post)

  1. smg6511
    Posted 4 years ago #

    For those who want to call this widget (in standalone mode) from another custom plugin, I suggest this alteration at the end of flexo_archives_widget.php:

    function flexo_standalone_archives ($echo=TRUE) {
        $archives = new FlexoArchives();
        if ($archives->standalone_enabled()) {
            $output = $archives->build_archives_list(
                echo $output;
            } else {
                return $output;

    I've discovered the problem with creating an archives page (via creating an archives.php template in a theme's folder) is that sometimes when you perform an update to a theme via the WP control panel, the process wipes out the custom files you'd created. To overcome that and future-proof the customization, I created a new plugin which simply adds a shortcode which in turn calls the above function to output the list. However, to maintain the correct order of content, the list needs to be returned instead of echoed.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Flexo Archives
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic