Title: mmachine's Replies | WordPress.org

---

# mmachine

  [  ](https://wordpress.org/support/users/mmachine/)

 *   [Profile](https://wordpress.org/support/users/mmachine/)
 *   [Topics Started](https://wordpress.org/support/users/mmachine/topics/)
 *   [Replies Created](https://wordpress.org/support/users/mmachine/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/mmachine/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/mmachine/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/mmachine/engagements/)
 *   [Favorites](https://wordpress.org/support/users/mmachine/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Need Help Querying Posts in a Dynamic Date Range](https://wordpress.org/support/topic/need-help-querying-posts-in-a-dynamic-date-range/)
 *  Thread Starter [mmachine](https://wordpress.org/support/users/mmachine/)
 * (@mmachine)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/need-help-querying-posts-in-a-dynamic-date-range/#post-1707100)
 * Ok, so I completely overlooked this from the PHP docs:
 * ‘W’ | ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0)
 * …which means there IS a much simpler way of doing this:
 *     ```
       $post_date = get_the_date();
       // Stringify the post dates
       $post_date = strtotime($post_date);
       // Declare first date in the query range
       $week_number = (int)date('W', $post_date);
       $year_number = (int)date('Y', $post_date);
       $post_query = 'w='.$week_number.'&year='.$year_number;
       query_posts($post_query);
       ```
   
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [I Broke my Threaded Comment Replies](https://wordpress.org/support/topic/method-of-moveform-function-when-replying-to-threaded-comments/)
 *  Thread Starter [mmachine](https://wordpress.org/support/users/mmachine/)
 * (@mmachine)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/method-of-moveform-function-when-replying-to-threaded-comments/#post-1619641)
 * I actually just found the problem though on my own. What happened is I’d removed
   the wp_enqueue_script() function from my header a few days ago during some testing
   and forgotten to add it back. This whole time I was trying to narrow down the
   problem to a comment ID or div ID declaration conflict, when it didn’t even occur
   to me to actually check that I had the library loaded in the first place.
 * Anyway, Esmi — appreciate the info! Probably would have found it through there
   sooner or later if I hadn’t gotten wise.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Need Help With Cranky Pagination on Page Templates](https://wordpress.org/support/topic/need-help-with-cranky-pagination-on-page-templates/)
 *  Thread Starter [mmachine](https://wordpress.org/support/users/mmachine/)
 * (@mmachine)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/need-help-with-cranky-pagination-on-page-templates/#post-1555889)
 * keesiemeijer, thanks! This didn’t solve my problem, but it’s actually a pagination
   technique I could definitely use.
 * As to what did solve my problem, it was having to do with the page URL being 
   the same as the custom post name. So, my page was ‘/television/’, and my custom
   post type is ‘television’, so WordPress wasn’t letting me go past the first page.
   Confusing, because if I try viewing /television/ by itself, there’s no default
   rendering or the custom post types, so I’m not exactly sure what call WordPress
   is protecting.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Post Thumbnails Are Repeating — Wuh huh?!](https://wordpress.org/support/topic/post-thumbnails-display-on-rpeat-wuh-huh/)
 *  Thread Starter [mmachine](https://wordpress.org/support/users/mmachine/)
 * (@mmachine)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/post-thumbnails-display-on-rpeat-wuh-huh/#post-1505942)
 * esmi, thanks! feel like an idiot — totally read over that yesterday before I 
   posted this question.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [echo the_post_thumbnail url](https://wordpress.org/support/topic/echo-the_post_thumbnail-url/)
 *  [mmachine](https://wordpress.org/support/users/mmachine/)
 * (@mmachine)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/echo-the_post_thumbnail-url/#post-1505378)
 * t31os_, looks like you’re right. After some more troubleshooting, I’m pretty 
   certain WordPress just pulls the closest-sized image based on the dimensions 
   in that array. The reason you need to be careful though is that with (potential)
   multiple image sizes, it sometimes pulls the wrong image, so you have to do a
   lot of cross-referencing and troubleshooting with your WP Media settings, the
   post thumbnail designation, and your template code. Bottom line, there’s several
   places where things can break, giving some unexpected results.
 * Anyway, thanks again for the answers. They’ve been super helpful!
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [the_post_thumbnail URL](https://wordpress.org/support/topic/the_post_thumbnail-url/)
 *  [mmachine](https://wordpress.org/support/users/mmachine/)
 * (@mmachine)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/the_post_thumbnail-url/#post-1320827)
 * Aeox — thanks for posting that code! Helped me start to solve a problem I’m having,
   but I’m getting some unpredictable results. Sometimes the proper post-associated
   thumbnail image is pulled, but other times the post gets the default 150×150 
   pulled instead.
 * Can you elaborate a bit more on the context of the array() argument in the get_attachment()
   function? In other words, does it look for a thumbnail sized to the specified
   dimensions (as put into the array), or does that array tell WordPress the dimensions
   at which to render the pulled image?
 * Thanks!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [echo the_post_thumbnail url](https://wordpress.org/support/topic/echo-the_post_thumbnail-url/)
 *  [mmachine](https://wordpress.org/support/users/mmachine/)
 * (@mmachine)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/echo-the_post_thumbnail-url/#post-1505312)
 * Hmm, nope! Your input is definitely putting me on the right track, but it still
   looks like that call is still referencing the legacy WordPress thumbnail data.
   I’ll do some digging of my own and try to see what’s going on.
 * I did find this snippet that sheds a bit of light, but I’m still having unpredictable
   results with the thumbnail its returning. Sometimes it pulls the properly-sized
   image I’m looking for, sometimes it pulls the default 150×150.
 *     ```
       <?php wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 60,60 ), false, '' ); ?>
       ```
   
 * Sorry for derailing by the way, but t31os_ you’ve been a huge help! Thanks!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [echo the_post_thumbnail url](https://wordpress.org/support/topic/echo-the_post_thumbnail-url/)
 *  [mmachine](https://wordpress.org/support/users/mmachine/)
 * (@mmachine)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/echo-the_post_thumbnail-url/#post-1505306)
 * Almost there! This one did pull a resized thumbnail, but the wrong one. It’s 
   pulling the WP 150×150 standard.
 * Fortunately I think my design accommodates for just resizing this one, but what
   I’m actually I’m looking to get the one designated by the user upon post, as 
   supported by this function — [http://codex.wordpress.org/Template_Tags/the_post_thumbnail](http://codex.wordpress.org/Template_Tags/the_post_thumbnail).
   With this function you have the option of calling various sizes, but I can’t 
   seem to find out if it’s possible to grab those same size variations using the
   get_attachment method?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [echo the_post_thumbnail url](https://wordpress.org/support/topic/echo-the_post_thumbnail-url/)
 *  [mmachine](https://wordpress.org/support/users/mmachine/)
 * (@mmachine)
 * [15 years, 12 months ago](https://wordpress.org/support/topic/echo-the_post_thumbnail-url/#post-1505296)
 * t31os_, I tried this as a workaround to an issue I was having — [http://wordpress.org/support/topic/400895?replies=1](http://wordpress.org/support/topic/400895?replies=1)—
   and while it worked for pulling the image, it pulls the full image size instead
   of the optimized, thumbnail resized version that the_post_thumbnail() does.
 * How would you access the WordPress-resized thumbnail variations with this?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [index.php — How To Hide Posts based on Tags?](https://wordpress.org/support/topic/indexphp-hide-posts-based-on-tags/)
 *  Thread Starter [mmachine](https://wordpress.org/support/users/mmachine/)
 * (@mmachine)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/indexphp-hide-posts-based-on-tags/#post-1144460)
 * Figured this out by using this code to build my query:
 * <?php
    $args=array( ‘showposts’=>10, ‘tag__not_in’ => array(‘4′,’6’), ); query_posts(
   $args); ?>
 * I was too dead-set on basing the query on the NAMES of my tags that I neglected
   a method based on the IDs.

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