Show author bio box

Try this one : <?php $authordesc = get_the_author_meta( ‘description’ ); if ( ! empty ( $authordesc ) ){ ?> <div class=”blog-article-author”> //author info here… </div> <?php } ?>

Work and Display a Custom Post Type as a normal Post

Ok, so I think you could apply the codex example as is: function search_filter($query) { if ( !is_admin() && $query->is_main_query() ) { if ($query->is_search) { $query->set(‘post_type’, array( ‘post’, ‘actualizacion’, ‘notificacion’ ) ); } } } add_action(‘pre_get_posts’,’search_filter’); I think you were just missing the !is_admin() check in there… Hope this helps!

Get current user, change users post status to published

The database holds several rows for each attribute of a post. All except on row should have status inherit. So I just hope the post_id is correct. Anyway, yes you are correct to assume that it is similar: $query = array( ‘ID’ => $post_id, ‘post_status’ => ‘publish’, ); wp_update_post( $query, true ); Oh and add_action(‘publish_post’… … Read more

How to create REST Based JSON API(how to modify the code below)?

try this: if (isset($_GET[‘api’])) { if ($_GET[‘api’] == ‘json’ && isset($_GET[‘id’])) { $args = array( ‘p’ => $_GET[‘id’], ‘post_type’ => ‘any’// ID of a page, post, or custom type ); $query = new WP_Query($args); // $query is the WP_Query Object $post = $query->post; // $post contains the post object header(“content-type: application/json”); echo json_encode($post); } exit(); … Read more

Display post on main page with thumbnail

What you need is a featured post plugin, you can either display that POST in the widget area or below the SEPARATOR line by using a template function. You can find many plugins to do this job at WordPress Plugin Repository. Link Here are 2 plugins Display Features News on Front Page Featured Post Content … Read more