Post Image not displaying in category view

add_theme_support( ‘post-thumbnails’ ); only adds the ability to use Featured Images. To have them appear in your site, you’ll need to add code to at least one of your template files, your active theme’s functions.php file, or a custom plugin. // in The Loop if( has_post_thumbnail() ) { the_post_thumbnail(); } // etc. References has_post_thumbnail() the_post_thumbnail() … Read more

How to get post body look same as my visual editor?

the editor uses its own stylesheet which might be quite different from the one on your theme. If you are willing to dig into the code it would make sense to make a stylesheet for the editor. See this for details http://codex.wordpress.org/Function_Reference/add_editor_style

Displaying post excerpt using wpdb query

I guess your post_excerpt field is empty and you need to generate an excerpt from the post_content. I agree with @t f using the general WP_Query(), have_post(), the_post(), the_excerpt() method of looping. I just want to mention that WordPress comes with the handy wp_trim_words() function that can be used to shorten text strings. Outside the … Read more

How to remove specific tag from multiple posts?

Since no direct function is there to achieve the required so I have made the code. Code is self explanatory and you can tweak it the way you like. <?php //Assuming a post ID to reset tags. $postid = 172; //Assuming tag2 is supposed to be removed $remove_tag = ‘tag2’; //Collecting all the tags of … Read more

Admin – no Featured image choice in create new/page|post

Your theme has not registered support for post thumbnails. You need to add one of these as appropriate: add_theme_support( ‘post-thumbnails’ ); add_theme_support( ‘post-thumbnails’, array( ‘post’ ) ); // Posts only add_theme_support( ‘post-thumbnails’, array( ‘page’ ) ); // Pages only add_theme_support( ‘post-thumbnails’, array( ‘post’, ‘movie’ ) ); // Posts and Movies See the Codex (link above) … Read more

Let both the admin and post author update comment meta

You can try to replace if ($current_user->ID == $post_data->post_author) { with if ( $current_user->ID == $post_data->post_author || $current_user->has_cap( ‘manage_options’ ) ) { to additionally allow users, with the correct capability, to vote for the best comment.

Hide comments and posts posted by other user

You can use a filter to pre_get_posts so that only your posts are listed. Something like this: function my_posts_only( $query ) { global $pagenow; if ( ‘edit.php’ != $pagenow || ! $query->is_admin ) return $query; if ( ! current_user_can( ‘manage_options’ ) ) { global $user_ID; $query->set( ‘author’, $user_ID ); } return $query; } add_filter( ‘pre_get_posts’, … Read more

Hide custom metabox value from custom fields

Custom fields or post meta entries can be hidden from the by default in WordPress available »Cutom Fields«-Metabox by prefixing them with a underscore – _ – as noted here. As addition, if you want hidden fields to be visible during development you can do that easily – take a look at this answer to … Read more