Making post views as sortable

The posts_column_register_sortable function, hooked onto posts_column_register_sortable returns an array with names of sortable columns as keys and their corresponding value what to sort by (e.g. ‘post_title’ etc). In your case you’ve given it ‘post_views’ to sort by, which doesn’t exist as a column – so you need to tell WordPress how to sort by it. … Read more

Remove custom posts that match taxonomy value

something along these lines should do it: $args = array( ‘post_type’ => ‘listings’, ‘posts_per_page’=> -1, ‘post_status’ => ‘any’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘status’, ‘field’ => YOUR FIELD NAME HERE??? ‘terms’ => ‘standard’ ) ) ); $query = new WP_Query( $args ); foreach( $query->posts as $id ){ wp_delete_post( $id->ID, TRUE ); }

Don’t post or draft if post already exists

I have no idea what IFTTT is but you can use the save_post action hook to do a check for duplicate posts. This hook runs whenever a post is created or updated you would then be able to right your own code to check against existing posts. http://codex.wordpress.org/Plugin_API/Action_Reference/save_post

The correct way to call posts with ajax

As @MatthewBoynes already stated, making a $.post() request for every image might bring some overhead. A maybe better solution would be to grab and cache them, then throw them into your js files using wp_localize_script(). $attachments = get_posts( array( ‘post_parent’ => get_the_ID() ,’post_type’ => ‘attachment’ ,’posts_per_page’ => -1 #,’exclude’ => get_post_thumbnail_ID() // only needed if … Read more

How to add in title a date but with other color, like in iMDb titles?

add this code in functions.php file add_filter( ‘the_title’, ‘ta_modified_post_title’); function ta_modified_post_title ($title) { global $post; $mynewdate = strtotime($post->post_date); $title = $title.'<span class=”modified”>’.date(‘Y’,$mynewdate).'</span>’.’-<span class=”modified”>’.date(‘d’,$mynewdate).'</span>-‘.'<span class=”modified”>’.date(‘m’,$mynewdate).'</span>’; return $title; } modify date by your own way.