Title: [Plugin: Flexible Posts Widget] Shortcode
Last modified: August 20, 2016

---

# [Plugin: Flexible Posts Widget] Shortcode

 *  Resolved [PeterRinderer](https://wordpress.org/support/users/peterrinderer/)
 * (@peterrinderer)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-flexible-posts-widget-shortcode/)
 * I like your new plugin very much. It is possible to add the shortcode-feature.
   I want tu use it not only as a widget, but within a post! Thanks a lot, Peter
 * [http://wordpress.org/extend/plugins/flexible-posts-widget/](http://wordpress.org/extend/plugins/flexible-posts-widget/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [DaveE](https://wordpress.org/support/users/dpe415/)
 * (@dpe415)
 * [14 years ago](https://wordpress.org/support/topic/plugin-flexible-posts-widget-shortcode/#post-2702365)
 * Hi Peter,
 * Sorry for my slow response. Yes, that seems plausible. I’ll add it to the wish
   list. Thanks for using the plugin!
 *  [Ricardo](https://wordpress.org/support/users/richard-hernandez/)
 * (@richard-hernandez)
 * [14 years ago](https://wordpress.org/support/topic/plugin-flexible-posts-widget-shortcode/#post-2702404)
 * I’d love to see this feature too.
    Is there a function to call in order to include
   the content of the widget in a template? Thanks!
 *  [Ricardo](https://wordpress.org/support/users/richard-hernandez/)
 * (@richard-hernandez)
 * [14 years ago](https://wordpress.org/support/topic/plugin-flexible-posts-widget-shortcode/#post-2702406)
 * I realized the plugin shows private posts, even if you’re not logged in your 
   blog. They should be hidden.
 *  Plugin Author [DaveE](https://wordpress.org/support/users/dpe415/)
 * (@dpe415)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/plugin-flexible-posts-widget-shortcode/#post-2702412)
 * Good catch, Richard. I’ve updated the plugin to not include Private posts.
 *  [Ricardo](https://wordpress.org/support/users/richard-hernandez/)
 * (@richard-hernandez)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/plugin-flexible-posts-widget-shortcode/#post-2702413)
 * Great! Thank you!
 *  Plugin Author [DaveE](https://wordpress.org/support/users/dpe415/)
 * (@dpe415)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-flexible-posts-widget-shortcode/#post-2702416)
 * Peter & Richard,
 * I spent some time thinking through adding shortcode support over the weekend (
   as well as publishing a new version of the plugin) and am not sure if it really
   makes sense to add that to the existing plugin as the plugin is very widget-specific.
   It almost seems like a completely separate plugin (functionality-wise).
 * But, I haven’t forgotten about the request. I’ll let you know how things proceed.
 *  [Ricardo](https://wordpress.org/support/users/richard-hernandez/)
 * (@richard-hernandez)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-flexible-posts-widget-shortcode/#post-2702417)
 * Hi Dave!
    It’s your choice and it will be welcome as you decide to do it. 🙂 
   Thank you!
 *  [capson](https://wordpress.org/support/users/capson/)
 * (@capson)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-flexible-posts-widget-shortcode/#post-2702457)
 * Hello, here is a work-a-round for shortcodes. To do this you will need a custom_functions.
   php file:
 * 1.) Create a widgitized sidebar that is called with a shortcode
 * Place in your custom_functions.php file:
 *     ```
       //Registering the sidebar1
       function ilc_register_sidebars1(){
           register_sidebar(array(
               'name' => 'Sidecode1',
               'description' => 'Widgets in this area will be shown using [shortbar1]',
               'before_widget' => '<div id="%1$s" class="%2$s">',
               'after_widget' => '</div>',
       	'before_title' => '<h3>',
       	'after_title' => '</h3>'
           ));
       }
       add_action( 'init', 'ilc_register_sidebars1');
       add_shortcode( 'shortbar1', 'shortbar_sc1' );
   
       //Creating the shortcode output
       function shortbar_sc1( $atts ) {
           ob_start();
           dynamic_sidebar('sidecode1');
           $html = ob_get_contents();
           ob_end_clean();
           return $html;
       }
       ```
   
 * Then, add to a page or post with [shortbar1] now
    go to widget page and add post
   widget to the sidecode1 sidebar.
 * You will probably need a plugin like widget logic or Widget Logic Visual or display
   widgets so you can use the [shortbar1] more then once.
 * If you need more then one sidebar change all the 1’s to 2’s
    except do NOT change
   these <div id=”%1$s” class=”%2$s”>
 * I hope this is helpful.
 *  [capson](https://wordpress.org/support/users/capson/)
 * (@capson)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-flexible-posts-widget-shortcode/#post-2702458)
 * Also, I just found this plugin that does the same thing, I have not used it but
   here is the link:
    [http://wordpress.org/extend/plugins/widgets-on-pages/](http://wordpress.org/extend/plugins/widgets-on-pages/)

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘[Plugin: Flexible Posts Widget] Shortcode’ is closed to new replies.

 * ![](https://ps.w.org/flexible-posts-widget/assets/icon-256x256.jpg?rev=984592)
 * [Flexible Posts Widget](https://wordpress.org/plugins/flexible-posts-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/flexible-posts-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/flexible-posts-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/flexible-posts-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/flexible-posts-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/flexible-posts-widget/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [capson](https://wordpress.org/support/users/capson/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-flexible-posts-widget-shortcode/#post-2702458)
 * Status: resolved