How to limit the number of results for all query_posts on mysite

It is not that hard to enforce a hard limit on results: add_action( ‘post_limits’, function($limit) { $limits = explode(‘,’,$limit); if (isset($limits[1]) && 2000 < $limits[‘1’]) { $limits[1] = 2000; } $limit = implode(‘,’,$limits); return $limit; } ); I would not be surprised if that does not solve your problem though. Just searching over that many … Read more

Image limit from 1 to 5

I haven’t tested this but I believe you would simply change some of the code close to the end of the snippet you posted. if (count(get_posts(“post_type=attachment&post_parent={$post_id}”))>5) $file[‘error’] = “Sorry, you cannot upload more than five (5) images.”; Let me know if this doesn’t address your needs.

Remove the height limit on wordpress 3.4.2

There is no height limit in WordPress, however your theme may have set the Content Width to 950, so the limit is there on the width in the theme. This limit prevents you from inserting an image wider than the available space for it on the page.

numberposts not working

Your problem is $tax_country, more actually the value. get_the_term_list() does not return what you think Returns an HTML string of taxonomy terms associated with a post and given taxonomy. Terms are linked to their respective term listing pages. Even if you strip away the tags, you will just be left with a string of term … Read more

Limit attachment caption characters

do you have a custom meta field associated with the image? if so place this in your functions.php: <?php $trim_length = 21; //desired length of text to display $custom_field = ‘your custom field key here’; $value = get_post_meta($post->ID, $custom_field, true); if ($value) { echo ‘<p>I want to use: ‘ . rtrim(substr($value,0,$trim_length)) . ‘…</p>’; } ?> … Read more