Kailey (trepmal)
Forum Replies Created
-
Forum: Plugins
In reply to: [Mini Loops] [Plugin: Mini Loops] place in templateHopefully this will help you understand possible values for each argument.
<?php // boolean: 0=false, 1=true $args = array( 'title' => 'Your Title', // the heading for the output 'hide_title' => 0, // boolean 'title_url' => '', // a valid url, where the heading should link to 'number_posts' => 3, // any number, how many posts to show 'post_offset' => 0, // any number, how many posts to skip 'post_type' => 'post', // any valid post type 'post_status' => 'publish', // any valid post status 'order_by' => 'date', // 'id', 'author', 'title', 'date', 'modified', 'parent', 'rand', 'comment_count', 'menu_order' 'order' => 'DESC', // 'DESC' or 'ASC' 'reverse_order' => 0, // boolean 'shuffle_order' => 1, // boolean 'ignore_sticky' => 1, // boolean 'only_sticky' => 0, // boolean 'exclude_current' => 1, // boolean 'categories' => '', // comma separated list of category IDs 'tags' => '', // comma separated list of tag IDs 'tax' => '', // query-string style taxonomy-termID pairs (Ex: category=1,2,4&post_tag=6,12) 'custom_fields' => '', // query-string style key-value pairs (Ex: meta_key=meta_value&key2=value2) 'exclude' => '', // comma separated list if post IDs to exclude 'before_items' => '<ul>', // html at beginning of output 'item_format' => '<li><a href="[url]">[title]</a><br />[excerpt]</li>', // html format for each result 'after_items' => '</ul>',// html at end of output ); miniloops( $args ); ?>I’m not sure why
'shuffle_order' => 1would result in corrupted text. I’m unable to replicate this issue.If you’re copying my example formats directly into the
miniloops()function instead of the widget field, you’ll have to replace the single quotes (should be 2, around the fallback parameter in the [image] shortcode) with double quotes. That should prevent the page from breaking.Here’s the very simple code for getting the 5 most recent posts, and then 5 random posts. However, the 5 random posts *may* contain some of the 5 most recent posts. There’s not currently an easy way to avoid this.
<?php //5 recent posts $args = array( 'number_posts' => 5, ); miniloops( $args ); //5 random posts $args = array( 'number_posts' => 5, 'order_by' => 'rand' ); miniloops( $args ); ?>Forum: Plugins
In reply to: [Mini Loops] [Plugin: Mini Loops] Adding Title To Template TagsTry
'title' => 'Your Custom Title',Forum: Plugins
In reply to: [Mini Loops] [Plugin: Mini Loops] CSS StylingYou should be able to adjust the css selectors like this
.miniloops ul { list-style:none; line-height:1.35em; margin:0;} .miniloops ul li { clear:both;width:100%;margin: 0 0 15px;} .miniloops ul a { font-weight:normal; } .miniloops ul img { float:left; margin:0 10px 0 0; padding:2px;border:none; }If that doesn’t work, your theme may be interfering.
Alternatively, you can add the ‘advanced-recent-posts’ class to the mini loops output.
If the Before Item field still has the default
<ul>you can change that to<ul class="advanced-recent-posts">That should make your original styles work without modification.Forum: Plugins
In reply to: [Mini Loops] [Plugin: Mini Loops] Show custom fieldsI’ll certainly consider this for the next release – it’s a good idea!
In the meantime, you can add this to helpers.php if you’d like
add_shortcode( 'ml_customfield' , 'miniloop_customfield' ); function miniloop_customfield( $atts ) { extract(shortcode_atts(array( 'name' => '', ), $atts)); $meta = get_post_meta( get_the_ID(), $name, true ); return $meta; }This would allow you to use
[customfield name=ages]inside the Item Format box. Note that this version does not take multiple custom fields at once, if you need to grab more than one custom field, simply repeat the code.Forum: Plugins
In reply to: [Mini Loops] [Plugin: Mini Loops] "See All" link afterwards…v0.7 should fix this issue. Let me know if it still gives you trouble.
Forum: Plugins
In reply to: [Mini Loops] [Plugin: Mini Loops] Can't pull images…Unfortunately, I’m unable to replicate the issue.
Are you using the latest version of WordPress?
Forum: Plugins
In reply to: [Mini Loops] [Plugin: Mini Loops] excellentI’m glad you like it! 🙂
Forum: Plugins
In reply to: [Post Editor Buttons] Buttons not added in WP 3.2.1There are some alternative plugins, including my fork of this plugin.
You can try commenting out line 68 of post-editor-buttons.php, (looks like
$input = array_map( 'peb_quote_replace', $input);) but it’s there because double quotes can cause breakage or not work as intended.Forum: Plugins
In reply to: [Mini Loops] [Plugin: Mini Loops] place in templateLook under Template Tag in the Other Notes section.
<?php $args = array( 'title' => __( 'Recent Posts', 'mini-loops' ), 'hide_title' => 0, 'title_url' => '', 'number_posts' => 3, 'post_offset' => 0, 'post_type' => 'post', 'post_status' => 'publish', 'order_by' => 'date', 'order' => 'DESC', 'reverse_order' => 0, 'shuffle_order' => 0, 'ignore_sticky' => 1, 'only_sticky' => 0, 'exclude_current' => 1, 'categories' => '', 'tags' => '', 'tax' => '', 'custom_fields' => '', 'exclude' => '', 'before_items' => '<ul>', 'item_format' => '<li><a href="[url]">[title]</a><br />[excerpt]</li>', 'after_items' => '</ul>', ); miniloops( $args ); ?>($args is showing default values)
Mini Loops can work with pages, but I haven’t done a lot of testing to see how well it works with child pages.
If you’re in a position to test it out, feel free to let me know how it goes and if you have any feedback.
Currently, the image is just being scaled down.
I’ve been developing a new plugin called Mini Loops that – among other things – create real thumbnails.
You’ll need to use category IDs, not slugs
Forum: Plugins
In reply to: [Mini Loops] [Plugin: Mini Loops] Suggested FeatureSuppose you have 26 posts named for letters of the alphabet. A was posted first and Z posted last (the most recent).
If you choose to get 10 posts, with Order By: Random, you could end up with these posts:
H, R, S, O, Y, B, C, E, D, P
If you choose 10 posts, Order By: Date with the “shuffle” checkbox ticked, you could get this:
S, Y, Z, W, Q, U, X, V, R, T
Forum: Fixing WordPress
In reply to: Getting post thumbnail URL@Chozen Can you post what code you have so far? If it’s lengthy, please use something like http://pastebin.com/.