marissalerer
Forum Replies Created
-
somehow I got it to work. I changed what was being returned to just the ID since that’s all I needed anyway. Also that remove_all_filters seemed to help as well.
<?php $works = get_field('work'); $allwork = implode(",", $works); remove_all_filters('posts_orderby'); ?> <?php echo do_shortcode('[ajax_load_more preloaded="true" post_type="work" post__in="'.$allwork.'" button_label="Load More" orderby="post__in" transition="fade"]'); ?>according to the codex you can do post__in
http://codex.ww.wp.xz.cn/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
‘post__in’ – Preserve post ID order given in the post__in array (available since Version 3.5)I have removed the trailing comma. Still no luck.
I stripped it down to this:
<li> <img src="http://placehold.it/1200x420" height="420" width="1200"> <header class="entry-header"> <?php the_title(); ?> </header><!-- .entry-header --> <a href="<?php the_permalink(); ?>"></a> </li><!-- #post-## -->and I’m still getting the duplication.
I actually stripped it down to just titles:
Artist to Watch | Ty Dolla $ign
Architect of the Future | Brand Film
Underworld, Inc | New Season Launch
Devious Maids | Custom Integration
Artist to Watch | Benjamin Booker
Devious Maids | Custom Integration
Underworld, Inc | New Season Launch
Dreamworks’ Home | Intergalactic Interview
Consistently Amazing | Keynote Address
Artist To Watch | Sam Smith
Blaze | Commerical
Halo Awards | Show Campaign
Laugh Your Butt Off | Brand Image Refresh
Team Umizoomi | App Spotand you can see what I mean about random duplication
My template is a bit convoluted but here it is. I don’t think the trailing comma is the issue but I can certainly remove it.
I’m using advanced custom fields for the ordering so I’ll look into other ordering options.
<?php if (empty($post->post_password)){ ?> <li id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if(!is_home()){ if(get_field('project_image_override')){ $src = get_field('project_image_override'); }else{ $vid = get_field('featured_video_id'); $src = get_vimeo_thumb($vid, 'thumbnail_', '1200x420'); } }else{ // if it's homepage serve the larger image if(get_field('hero_image')){ $src = get_field('hero_image'); }else{ $vid = get_field('featured_video_id'); //$src = get_vimeo_thumb($vid, 'thumbnail_', '1200x710'); $src = get_vimeo_thumb($vid, 'thumbnail_', '1200x675'); } } ?> <img src="<?php echo $src; ?>" height="420" width="1200"> <header class="entry-header"> <div class="copy"> <?php $taxes = wp_get_post_terms(get_the_ID(), 'clients', array("fields" => "all")); $clients = ''; foreach ($taxes as $tax) { $clients.= $tax->name.', '; } $client = substr($clients, 0, -2); ?> <h1 class="hasicon"><i class="ce-cross pink"></i><?php echo $client; ?></h1> <?php the_title(); ?> </div> </header><!-- .entry-header --> <a href="<?php the_permalink(); ?>"></a> </li><!-- #post-## --> <?php } ?>I’m having this same problem. I’ve done the listAllBuckets as described in the article above but I still can’t save my bucket choice.