chadvonlind
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: WooCommerce Product Vendors]I’m also interested in a solution to this. ??
Forum: Hacks
In reply to: Custom Taxonomy – Link CategoriesForum: Themes and Templates
In reply to: Get children of Custom Post TypeThat works great! Can I buy you a beer? Do you have a paypal account?
Forum: Themes and Templates
In reply to: Get children of Custom Post TypeThanks for that, Vayu. Would you know how to exclude children from a hierarchical post type loop?
$loop = new WP_Query(array('post_type' => 'cruise', 'post_status' => 'publish'));
I figure this would include the argument that I need. But I don’t see anything under query_posts or WP_query that would allow for that.
Forum: Fixing WordPress
In reply to: problems with is_post_type() – perhaps it is a bug?Strangely, I couldn’t get this to work in my
functions.php
file.if(is_singular('missions')) { wp_enqueue_script('missionscript', get_bloginfo('template_url') . '/assets/js/mission.js', array('jquery'), '1', true); }
So I ended up having to just call it in my footer.
<?php if(is_singular('missions')) { // Only gets called on Mission pages ?> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/assets/js/mission.js"></script> <?php } ?>
Any idea why this wouldn’t work with the functions file?
Forum: Fixing WordPress
In reply to: TimThumb.phpTry using this code within the loop.
<?php $args = array( 'post_type' => 'attachment', 'orderby' => 'menu_order', 'order' => 'ASC', 'post_mime_type' => 'image' ,'post_status' => null, 'post_parent' => $post->ID ); $attachments = get_posts($args); if ($attachments) { foreach ( $attachments as $attachment ) { ?> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/thumb.php?h=180&w=400&zc=1&src=<?php echo wp_get_attachment_url( $attachment->ID , false ); ?>" alt="<?php the_title(); ?>" width="400" height="180" border="0" /></a> <?php } } ?>
Forum: Hacks
In reply to: Dotted BorderWith CSS
He’s using this as a background image, and tiling it along the bottom.
vocal-alchemy.com/wp-content/themes/eagle/images/dottedtop.png
See .breadcrumbs in his stylesheet for an example.
Forum: Hacks
In reply to: Array all images attached to post**FACEPALM**
It was the jQuery lazyload script interfering.
Forum: Hacks
In reply to: Array all images attached to postI wonder if it has to do with some other tags. When I assign the attached images a order number, it seems to mess with things.
Forum: Hacks
In reply to: Array all images attached to postHah. Crap. Now this code is doing the same thing as the previous code. What gives??
Forum: Hacks
In reply to: Array all images attached to postI’ve found the solution, and it was even suggested on the get_children reference page in the Codex. Use get_posts instead! Here it is for anybody interested.
<?php $args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_mime_type' => 'image' ,'post_status' => null, 'post_parent' => $post->ID ); $attachments = get_posts($args); if ($attachments) { foreach ( $attachments as $attachment ) { ?> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_url'); ?>/thumb.php?src=<?php echo wp_get_attachment_url( $attachment->ID , false ); ?>&h=145&w=235&zc=1" alt="<?php the_title(); ?>" width="230" height="140" border="1" /></a> <?php } } ?>