WordPress.org

Ready to get started?Download WordPress

Forums

Mini Loops
Thanks and feature requests (4 posts)

  1. Doug Smith
    Member
    Posted 2 years ago #

    Thanks so much for making and sharing Mini Loops! I had been looking for a flexible widget that would let me display the entire contents of a post along with custom fields and I hadn't found anything I really liked.

    I ran across your plugin when I saw it listed as one of the first that used the new WordPress plugin repository image banner feature. I gave it a try and it was perfect for what I had been working on. The variety of shortcodes available in the formatting fields along with a little html provides a lot of power. (I immediately added a small thank you to your Starbucks card and I encourage everyone else who is enjoying this plugin to follow your donate link and do the same or give a small donation.)

    I hope you don't mind if I toss in a few feature requests...

    1. It would be great if there was a way to specify an HTML id or class for the entire widget for custom styling. Sure, I can grab the automatically numbered id, like miniloops-2 but it's more reliable to assign a specific class or id that won't change as I use instances of the widget.

    2. I'm finding that I'm using the Before Item and After Item formatting fields to add a good deal of markup to include additional content around the list of post content. For example, I might have a little intro text followed by the list of post title links, followed by some text and a link to see all of the posts. It would be helpful if these fields were larger so editing was easier.

    3. As in my previous example, I often display several posts and then include a link to read all posts of that type. I'm able to accomplish this by hardcoding the link to the post archive page but it would be very useful to have additional formatting shortcodes for the selected post type archive url and post type name.

    I've grabbed those values in a theme before with code something like this:

    $post_type_obj = get_post_type_object( $post_type );
    $post_type_name = $post_type_obj->labels->name;
    $post_archive_url = get_post_type_archive_link( $post_type );

    http://wordpress.org/extend/plugins/mini-loops/

  2. Doug Smith
    Member
    Posted 2 years ago #

    In further testing, it seems that if I put much markup in the Before Item and After Item fields some of it gets ignored. So I guess that would have to be changed before my suggestion to make the fields larger would even matter.

  3. Kailey (trepmal)
    Volunteer Mod & Reviewer
    Plugin Author

    Posted 2 years ago #

    I've updated the development version of this plugin to address some of this.

    = Version 1.1 =
    * New: Changed Before/After Items inputs to textareas for easier modifying if there is a lot of markup
    * New: Filters for the Before/After Items content. <code>miniloops_{before|after}_items_format</code> $query arguments passed to it. See source for more details.
    * New: "Mini Mini Loops" widget. Simplified 'Recent Posts' widget for typical usage - only 3 options.

    1. You can add a class to the 'before_items' markup. IDs can be tricky because that field is passed through wp_filter_post_kses(). Most IDs (with the exception of a few elements) are stripped out. If you want to modify that, I've added some notes to the FAQ. Also here:

    To allow an additional tag, use this:

    add_filter( "admin_init", "allowed_tags" );
    function allowed_tags() {
    	global $allowedposttags;
    	$allowedposttags["video"] = array();
    }

    To allow additional attributes for any tag, use the following code:

    add_filter( "admin_init", "allowed_tags" );
    function allowed_tags() {
    	global $allowedposttags;
    	$allowedposttags["video"]["src"] = array();
    	$allowedposttags["video"]["type"] = array();
    	$allowedposttags["video"]["poster"] = array();
    }

    2. Should be taken care of in the dev version. The fields don't start large, but as long as your browser supports expandable textareas, you can enlarge them at will. If more people bring up the field size as an issue, I can make them even larger by default.

    3. I'm looking into this, but the nice clean in-widget solution is escaping me at the moment. However, the dev version does add some filters to the Before/After Items fields, and in mini-loops.php there's a demo of the filter that appends the post type archive URL to the After Items field.

  4. Doug Smith
    Member
    Posted 2 years ago #

    Wow, that's great! I'll give it a try.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags