ambius
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: posts_per_page is wrongI have been using ‘caller_get_posts’=>1
The bug I’m experiencing is when this line is not included (I’m guessing the default value then would be 0). Thank you for the link to the Trac system. When I have more time, I will verify that my bug is unique and report it.
Forum: Fixing WordPress
In reply to: the_excerpt() returns wrong number of wordsI’m not using any plugins that affect post content or excerpts.
this is the very simple code I’m using
<? query_posts('posts_per_page=10&caller_get_posts=1'); function new_excerpt_length($length) { return 20; } add_filter('excerpt_length', 'new_excerpt_length'); if( have_posts()) : while (have_posts()) : the_post(); ?> <div class="post"> <div class="post-title"><a>" rel="bookmark" title="Permanent Link to <? the_title_attribute(); ?>"><? the_title(); ?></a></div> <div class="post-date"><? the_date('F j, y') ?></div> <div class="post-content"><? the_excerpt() ?></div> <div class="post-footer">POSTED BY <? the_author() ?> and last updated on <? the_modified_time('F jS, Y'); ?> at <? the_modified_time('g:i a'); ?> <? comments_popup_link('« 0 Comments »', '1 Comment', '% Comments'); ?> </div> </div> <p> </p> <? endwhile; endif; //end the loop ?>and here is the page on my test server if you want to see the wordcount outputs for yourself
http://uofmbooks.com/wordpress/
the first 7 posts are fine, but the 8th post “Minutes for 2-1-10” contains 30 words. Minutes for 10-27 has 22 words. etc…Forum: Fixing WordPress
In reply to: posts_per_page is wrongeither we are not understanding each other here, or your developers have a pretty flawed idea of how to implement features with consistency. Not exactly logical for 5 to mean 6, but only sometimes, on some pages, and not others. But I think we are understanding each other fine and the devs really are that bad. That’s why WP is so hard to work with and sucks for anything outside of a blog page.
or maybe I’m wrong about the devs and you are just failing to see the bug here.
Forum: Fixing WordPress
In reply to: posts_per_page is wrongsorry for posting in my own topic, yet again, but I think I finally fixed my problem and wanted to share the code in case it helps someone else.
I added caller_get_posts=1 to my query arguments to treat sticky posts like a normal post. This works great for me because I didn’t want any of those stickies to be sticky on my index (only on a few archive pages). Now when I tell it to give me 3 posts it gives exactly 3. and when I ask for 6 it gives me exactly 6.
However, I still think WP is bugged because when you allow stickies to be sticky, the posts per page count is off by 1. an easy programming mistake to make.
Forum: Fixing WordPress
In reply to: posts_per_page is wrongI think figured out part of my problem. I have 4 sticky posts that I was using to stick at the top of a different page… I’m guessing that is why there is a minimum of 4 posts returning. However, I still don’t know why I’m getting 5 when I ask for 4, or 15 when 14, etc. I have exactly 4 sticky posts in my entire database.