Custom Background not Appearing
Custom Background not Appearing
Custom Background not Appearing
I would start by making this part a plug-in for the theme. Then, look at all the code the source plugin provides. I am unfamiliar with this one but it looks to be ok. Find the actions and filters it introduces and use those to build your plugin. In fact I think on init you … Read more
That one line is all you need, try adding this to your functions.php file. function my_theme_setup(){ add_theme_support(‘post-thumbnails’); } add_action(‘after_setup_theme’, ‘my_theme_setup’); I’m not sure what your “post types file” is but the above should be enough to add support.
Edit footer via customizer
Memory is not the issue here. There are no complex operations, and the difference will be almost unmeasurable. What matters is readability: If your stuff function is rather short (less than eight functional steps) and you use the check just once – keep the check in it. But if you need the support check in … Read more
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
You could always set WP_USE_THEMES to false, and handle all the template/display logic on your own. (But, that requires access to the users wp-config or index to set the constant, which is out of scope for a plugin, though you could make it an installation requirement). Taking a look at template-loader.php you could have an … Read more
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’ ) );
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
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