Registering different Post Formats for Blog Post and CPT

I found an alternative approach. There is a unique class in body tag for each post type. e.g for portfolio post type i can use the CSS code something like mentioned below to hide the extra option. .post-type-portfolio #post-format-audio, /* for radio button itself */ .post-type-portfolio .post-format-audio /* for option label */ { display: none; … Read more

Post thumbnail not showing in WP admin area for custom post type

I think it’s possible the 2 separate enabling statements may be interfering with each other. The purpose of having an array is to combine them into one enabling statement. Try the following in your functions file. Instead of: add_theme_support( ‘post-thumbnails’ ); add_theme_support( ‘post-thumbnails’, array( ‘customposttypename’ ) ); This: add_theme_support( ‘post-thumbnails’, array( ‘post’, ‘customposttypename’ ) );

add_theme_support(‘custom-header’) does not add the option to customize

From the array above, I think you just left out “uploads”. And if you’re wanting to be able to upload headers in the admin panel, it’s good to include the “width” and “height” in the array as well. $chargs = array( ‘width’ => 980, ‘height’ => 60, ‘default-text-color’ => ”, ‘default-image’ => ”, ‘uploads’ => … Read more

Adding schema.org itemprop to WP4.1 Title Tag

If your theme is using add_theme_support(‘title-tag’), then you can try the following: remove_action( ‘wp_head’, ‘_wp_render_title_tag’, 1 ); and then just hook in your own modified version: add_action( ‘wp_head’, ‘wpse_render_title_tag_with_itemprop’, 1 ); function wpse_render_title_tag_with_itemprop() { if ( did_action( ‘wp_head’ ) || doing_action( ‘wp_head’ ) ) { printf( ‘<title itemprop=”name”>%s</title>’ . PHP_EOL, wp_title( ‘|’, false, ‘right’ ) ); … Read more

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