I'm trying to add a custom background on a child theme. In the child theme's functions.php, I add add_theme_support( 'custom-background'); and the background option appears under the "Appearance" menu as expected. I add the image that I want, save, and nothing happens. The image won't appear as the background. What am I doing wrong? Using version 4.3.1. This is all that's in my child theme's function.php" <?php add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); …
I enabled custom-logo for my theme and have it printed with <?php the_custom_logo(); ?> into the header. Is there any chance to simply add some more classes to this image directly? Per default it only comes with custom-logo.
I made a custom theme, but the menu is not showing in appearance section. I created a separate function file named function.php and the code is: add_theme_support( 'menus' ); function register_my_menu() { register_nav_menu( 'new-menu', __( 'New Menu' ) ); } add_action( 'init', 'register_my_menu' ); and calling in header.php, the code is: wp_nav_menu( array( 'theme_location' => 'new-menu' ) ); How to manage it? When I create new pages, it shows as menu.
I'm not even sure this is possible but before I start thinking up crazy solutions, I'll see if there is a WordPress way to do it. Here's the deal. I have a timeline jQuery plugin all set up on WordPress and I want it to be callable in a child theme through the add_theme_support method: add_theme_support( 'timeline' ); Call it an obsession with modular design. I've probably read too much Tadlock for any one man's sanity but it's working for …
I'm using add_theme_support( 'custom-header', $defaults ); to support custom header images in my theme. The $defaults are described in the Custom Headers article $defaults = array( 'default-image' => '', 'random-default' => false, 'width' => 0, 'height' => 0, 'flex-height' => false, 'flex-width' => false, 'default-text-color' => '', 'header-text' => true, 'uploads' => true, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); There is no explanation in the Codex for the following. What do they mean? wp-head-callback admin-head-callback admin-preview-callback
Using add_theme_support( 'editor-color-palette' ) one can replace the color palette in the Gutenberg editor by a custom one: add_theme_support( 'editor-color-palette', array( array( 'name' => __( 'Strong magenta', 'themeLangDomain' ), 'slug' => 'strong-magenta', 'color' => '#a156b4', ), array( 'name' => __( 'Light grayish magenta', 'themeLangDomain' ), 'slug' => 'light-grayish-magenta', 'color' => '#d0a5db', ), ) ); My question is, is there a way to ADD colors to an existing palette (via a child theme, for example) without completely replacing it? Thanks in …
I'm working on my first theme built from custom gutenberg blocks. I've managed to register blocks and enqueue their specific stylesheets, but I'm running into one issue that's kind of a pain. A lot of my blocks override global styles from my style.css file. However, when I enable editor styles, the .editor-styles-wrapper class is superseding the block styles. To offer an example, here's my global container style: div.tmp-container-fixed { flex-direction: row; } In my block-specific stylesheet: section.sign-up .tmp-container-fixed { flex-direction: …
I've added my own font sizes to the theme I'm working on, but the value "Default" persists in the dropdown. With the name scheme needed for this particular site I cannot just reformat "Default" to fit with my baseline typography. Can "Default" be removed or renamed somehow? Code: add_theme_support( 'editor-font-sizes', array( array( 'name' => esc_attr__( 'Book 16px', 'wav' ), 'size' => 16, 'slug' => 'book16px' ), array( 'name' => esc_attr__( 'Book 20px', 'wav' ), 'size' => 20, 'slug' => 'book20px' …
How do I add support for excerpts for post categories in the admin? I have tried the following, but to no avail: add_post_type_support('category', 'excerpt'); add_post_type_support('post_category', 'excerpt'); add_post_type_support('taxonomy', 'excerpt'); It's got to be something like this, but I just don't know.
I'm encountering this very frustrating problem where add_image_size() just doesn't seem to work at all (in fact, I've never seen it even work before). By not working, I mean not resizing / crop (if I take away my CSS width / height, the thumbnail will be the exact size in which I have uploaded it). I do have: add_theme_support( 'post-thumbnails' ) add_image_size( 'small-thumb', 60, 60, true ) the_post_thumbnail( 'small-thumb' ) And most importantly, yes I've been regenerating my thumbnails close …
I've seen theme support (add_theme_support) for "custom-header", "custom-background" and "custom-logo", but not for footer (footer colur or image). Is there no option to let users choose footer color or image via "Appearance" --> "Customize"? Thank you for your advice!
I'm developing a theme for Themeforest and one of their requirements is about the tag. Themeforest states their requirement as follows: The theme must let WordPress add and manage the title. This is done by adding add_theme_support( 'title-tag' ); to functions.php instead of using wp_title() in the document head. The current output is on the home page: 'Site title - Site tagline'. On other pages it is 'Post or page title - Site tagline'. The separator is '-'. Can anyone …
I have a very simple theme to which I need to add custom-background support. When I go into appearance -> customize, I am able to select a background image. However, the background of the site never actually changes, and I can see that the output html contains <body class="home blog logged-in admin-bar no-customize-support custom-background"> But there are no <style> tags to be seen. Does anyone have any suggestions as to what may be going wrong? header.php <html> <head> <title>Tutorial theme</title> …
I am new to Wordpress and following a training course. Its told me to enable to use of Featured Images I need to add the following line into my functions.php: add_theme_support('post-thumbnails'); and then the following in my post types file: 'supports' => array('title', 'editor', 'thumbnail'), However I have done this but no luck getting the option to add a featured image. I have checked screen options and it is not appearing as an option I can enable. I've checked similar …
I am creating my own theme. I would like to edit the footer in the customizer. I was able to enable the custom logo etc. but I can't find a solution how to enable the footer button in the customizer. How can I enable the button in the customizer to edit the content of the footer? I haven't found anything with add_theme_support(). Is there another way to edit the footer in the backend?
I want to add a custom font into my theme. Please let me know if this is just as simple as uploading the font to a new folder named "fonts" and then changing the css and renaming the font-family property there or it's somewhat different procedure. I am not sure about it. Please help me.
I have added the add_theme_support( 'custom-background'); function to my functions.php but the css added to the wp_head isn't the way I want it to be. <style type="text/css" id="custom-background-css"> body.custom-background { background-image: url('http://localhost/wordpress/wp-content/uploads/2016/05/bg_green_dark.jpg'); background-repeat: no-repeat; background-position: top center; background-attachment: fixed; } </style> I have a div as background. <div id="bg"></div> And I want to add custom-background to the div instead of the body. Is there any way to do that?
Apparently WordPress 5.x renders HTML5 in search forms, comment forms, comment lists, gallery, etc. I've deleted this support in functions.php and HTML5 is alive and kicking. It seems odd that I would need this today, or is this for legacy themes only? Thanks for clarifying
I want to ask why after I deleted the add_theme_support($feature='menus') in my functions.php there is still menus in my theme activated. why it is still there even if I did not write the add_theme_support for menu. Can anyone explain it? thanks and best regards
I have a must use plugin that uses register_theme_directory() but no matter what path I pass in, it always returns false. For some background I am using domain based database switching in the wp-config to manage multiple distinct sites with one install, (i am not using a network install because each site needs it own unique users database). I have some themes I want to only be available to one specific site, so I put it in a special directory …