ID; $author_posts_text = applica_get_option('author_posts_text'); $no_of_author_posts = absint(applica_get_option('no_of_author_posts')); $order = esc_attr(applica_get_option('author_posts_order')); $orderby = esc_attr(applica_get_option('author_posts_orderby')); // Covert id to ID to make it work with query if ('id' == $orderby) { $orderby = 'ID'; } $author_posts_args = array( 'author' => get_the_author_meta('ID'), 'post_type' => 'post', 'post__not_in' => array($post_id), 'posts_per_page' => $no_of_author_posts, 'ignore_sticky_posts' => 1, 'orderby' => $orderby, 'order' => $order, ); $author_posts_query = new WP_Query($author_posts_args); if ($author_posts_query->have_posts()): ?>