WordPress HTML5 Gallery Support – Convert HTML4 -> HTML5
Try this: add_theme_support( ‘html5’, array( ‘gallery’, ‘caption’ ) ); And don’t forget to declare the HTML5 DOCTYPE at the very beginning of header.php with: <!DOCTYPE html>
Try this: add_theme_support( ‘html5’, array( ‘gallery’, ‘caption’ ) ); And don’t forget to declare the HTML5 DOCTYPE at the very beginning of header.php with: <!DOCTYPE html>
It’s import to set the priority for your after_setup_theme higher than your parent theme. The default priority is 10. Using the twentysixteen as example, use priority 11 on child themes’ ‘after_setup_theme’ action. Exemple below: function twentysixteen_child_setup() { add_theme_support( ‘post-formats’, array( ‘video’, ) ); } add_action( ‘after_setup_theme’, ‘twentysixteen_child_setup’, 11 );
You still need to do it, if you want to use HTML5 markup for certain elements. WordPress doesn’t have any other way to tell the difference between “legacy” themes and more recent ones, and the old markup is still the default for backwards compatibility reasons. As recently as 5.3 there are still changes being made … Read more
You use the document_title_separator filter. So in your case: <?php function theme_prefix_filter_document_title_separator() { return ‘|’; } add_filter( ‘document_title_separator’, ‘theme_prefix_filter_document_title_separator’ ); ?>
Future readers: I will update this answer based on further research if I find a better way to do it, but this represents the current best effort. If you are reading this, and curious if I found a better solution, look below, if I found it i updated this answer, if I didn’t.. then I … Read more
Use remove_post_type_support to disable features for specific post types. add_action( ‘init’, ‘wpa63635_init’ ); function wpa63635_init() { remove_post_type_support( ‘post’, ‘thumbnail’ ); }
It seems that error is in your theme.min.css. The Font Awesome Icon which should appear in the browser is added via CSS using content. But the CSS does not contain the icon information but these weird looking characters. For Example: .fa-music:before{content:”ï��”} I cannot tell why your minified CSS has these characters. This could be: a … Read more
According to the documentation, you must pass an array of items where you want to enable HTML5 markup: add_theme_support( ‘html5’, array( // Any or all of these. ‘comment-list’, ‘comment-form’, ‘search-form’, ‘gallery’, ‘caption’, ) ); The documentation also recommends using add_theme_support() on the after_setup_theme hook, stating that the init hook may be too late for some … Read more
custom background can be used in below way: $defaults = array( ‘default-color’ => ”, ‘default-image’ => ”, ‘default-repeat’ => ”, ‘default-position-x’ => ”, ‘default-attachment’ => ”, ‘wp-head-callback’ => ‘_custom_background_cb’, ‘admin-head-callback’ => ”, ‘admin-preview-callback’ => ” ); add_theme_support( ‘custom-background’, $defaults ); Example usage: $args = array( ‘default-color’ => ‘000000’, ‘default-image’ => ‘%1$s/images/testback.jpg’, ); add_theme_support( ‘custom-background’, $args … Read more
Can I add multiple arrays within add_theme_support( ‘colors’ )?