Conditional PNG Overlay in Custom Post Type Loop Depending on Post Type

You can do: if( ‘video’ == $post->post_type ) $play_button = ‘/images/btn-play.png’; elseif( ‘slideshow’ == $post->post_type ) $play_button = ‘/images/btn-ss.png’; Then render the button with: <img src=”https://wordpress.stackexchange.com/questions/4052/<?php echo get_bloginfo(“template_directory’) . $play_button; ?>” class=”play” /> Hope that helps!

Can I create a loop with multiple post types and specify different $args for each post type?

Can I create a loop with multiple post types and specify different $args for each post type? Simply put no… you can’t have a single query instance with three differing sets of arguments. The reason why is pretty simple, the query class will only take one array of arguments per instance. If you want differing … Read more

get_template_part and template file names

Codex has very decent explanation of get_template_part() logic: Assuming the theme folder is wp-content/themes, that the parent theme is twentyten, and the child theme is twentytenchild, then the following code — <?php get_template_part( ‘loop’, ‘index’ ); ?> will do a PHP require() for the named files in this order: wp-content/themes/twentytenchild/loop-index.php wp-content/themes/twentytenchild/loop.php wp-content/themes/twentyten/loop-index.php wp-content/themes/twentyten/loop.php Basically you … Read more

How to detect filter in URL in Category page?

If I’m understand the question right…. first login to the admin section. then click on “categories” its in the “Posts” accordion box. When your there you’ll see all your categories. Next, following your example, you need to make “current”, “future”, and “past” all children of “tasks”. this should achieve the desired URL. Let me know … Read more