Sort post by last commented

For this you can use WP_Comment_Query. The query will be $comments_query_args = array( ‘post_type’ => ‘post’, ‘number’ => 5, ‘status’ => ‘approve’ ); $comments_query = new WP_Comment_Query(); $recent_comments = $comments_query->query($comments_query_args);

How to perform a search inside a specific taxonomy category

try this: Put this code in your search form: <form method=”get” id=”searchform” action=”<?php bloginfo(‘url’); ?>/search”> <?php $args = array( ‘public’ => true, ‘_builtin’ => false ); $output=”objects”; $operator=”and”; $taxonomies = get_taxonomies( $args, $output, $operator ); $my_tax_array = array(‘your_taxonomy_name1′,’your_taxonomy_name2′,); //make array of your taxonomies echo “<select id=’my_select_taxonomy’ name=”my_select_taxonomy”>”; echo “<option value=”0″>—-</option>”; if ( $taxonomies ) { … Read more

meta_query dates from an array

If you store the meta as a serialized array, you should do meta query like this: $args = array( ‘post_type’ => ‘income’, ‘meta_query’ => array( array( ‘key’ => ‘income_dates’, ‘value’ => “2014-02-01”, ‘compare’ => ‘LIKE’ ), ) );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)