Why does Featured Images not load in the backed?

In your code excerpt you have a function to add theme support for post thumbnails but you don’t include a line where you actually run it. Can you confirm that you are also executing wpb_theme_setup() as well as defining it? If it’s the only thing in the function, you could just call add_theme_support( ‘post-thumbnails’ ); … Read more

Display ads on post in a particular category

You can not use this code twice, since it’s declaring a function, and declaring a function twice with the same name will trigger a fatal error. If you want to extend the function, you can use it this way: if(!(in_category(‘7’) OR in_category(‘8’) OR in_category(‘9’))) return $content; This will show the ads on these 3 categories.

How can I add a custom checkbox / radio button on the admin theme options to display a CSS or other?

This is a fairly broad question. There are many approaches thinkable, but here is the lay-out for an easy one: Build a child theme, consisting only of a style.css. Find the id of the highest level wrapper in the theme, let’s say 2016id In style.css add style rules that depend on the class of the … Read more

Show post excerpt

One option would be to use substr in your function: function my_excerpt($limit) { $excerpt = get_the_excerpt(); if(strlen($excerpt) > $limit) { // trim to $limit characters $excerpt = substr($excerpt, 0, $limit); // remove any truncated words $excerpt = substr($excerpt, 0, strippos($excerpt, ” “)); $excerpt = trim(preg_replace(‘/\s+/’, ‘ ‘, $excerpt)); } return $excerpt; } Another way is … Read more