How to second orderby in “pre_get_posts” by meta value or combine single date and time to timestamp

I’m outlining a solution for what you asked in your last comment, because this wouldn’t been fitting for the comment format. Code: function date_time_to_timestamp_meta( $post_id ) { // meta fields are saved in DATETIME, e.g. »2013-12-09 22:32:12« // here is only the date part relevant $datetime_date = get_post_meta( $post_id, ‘_start_date’, true ); // here is … Read more

Thumbnails for custom post not showing up in query

<div class=”col-md-4″> <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>> <header class=”page-header” style=”border-bottom:none; margin-bottom:0;”> <div style=”margin-bottom:5px;”> <a href=”https://wordpress.stackexchange.com/questions/125845/<?php the_permalink(); ?>” rel=”bookmark”> <?php if ( has_post_thumbnail() ) { the_post_thumbnail(‘col-6-thumb’); } ?> </a> </div> </header> <div class=”article-info”> <div class=”article-date”><h3><?php the_time(‘M jS’) ?></h3></div> <div class=”articletitle”><h3><a href=”https://wordpress.stackexchange.com/questions/125845/<?php the_permalink(); ?>” rel=”bookmark”><?php the_title(); ?></a></h3><p>by <?php the_author() ?></p></div> </div> </article><!– #post-## –> </div> … Read more

WordPress Error Missing Argument [duplicate]

That plugin is using outdated code. $wpdb->prepare used to allow the second parameter to be omitted, though using prepare without it never really made since. As of 3.5 the second parameter is required. You will need to update the plugin, if there is an update, or hack the plugin yourself which is prone to cause … Read more