Questions tagged [theme-customizer]

The Customizer is a framework for staging changes in WordPress. Settings may model anything in a given site (options, theme mods, widgets nav menus, posts, etc.) and the changes are bundled into changesets which are then previewed, saved as drafts, and even scheduled. Themes and plugins alike may extend the Customizer. Questions should be posed related to the Customize API in WordPress, in either PHP and JS.

0
votes
1answer
16 views

Using different header images for different devices

I'm using the Ascension theme (by Go Daddy). When my website is loaded using a PC or ipad my header looks ok, however when loading it on a phone it is not resizing to fit the screen (so I'm losing a ...
0
votes
2answers
11 views

get_theme_mod only returns false

I have created a custom section with a setting with one control allowing users to choose fonts from a dropdown. However, when I use the get_theme_mod() function, and echo the results to a styles tag ...
0
votes
0answers
19 views

WordPress Starter Content: can't access the created posts

I'm having a big pain with starter content feature of Wordpress. At the moment I'm using the hook customize_save_after to get the posts, using the normal function I use to get posts get_posts. It's ...
0
votes
1answer
16 views

Fatal error: Class WP_Customize_Image_Control not found

I'm using WAMP on Windows 8.1 64 bits to develop a custom theme. Right now, I'm getting the following errors when trying to create a custom control with the WP_Customize_Image_Control class: Fatal ...
1
vote
1answer
25 views

Get a setting value conditionally in the Customizer api

I'm doing this the normal way, instead of refresh I edit the element with JS according to the user selection, but in one case, I need a value that depends on another value and I can't get that. Here'...
0
votes
0answers
22 views

Can you make sub-panels in customizer?

I see a lot of posts about this, they all suggest some tricky ways and they say it's not possible out of the box. But those are old posts, can anyone confirm if wp core can't handle this yet as it ...
0
votes
1answer
22 views

Don't print customizer styles when no setting has been used

I'm adding some options to a theme through my plugin, I want to change this theme styles and I'm almost there... Now I need to know how I can hide the <style> tag when no settings are changed (...
0
votes
1answer
12 views

What is difference between add_theme_support and Theme Customization API?

I'm interested in adding customizable features to a theme. What is the difference between the following add_theme_support(...) and Theme Customization API Are they just 2 different ways to ...
0
votes
0answers
11 views

Product page grid is not organized

I build my site by free theme made by Acme, called online-shop theme. However, I face the problem of displaying with the product page view, as the below attached image: link imgur to see my product ...
0
votes
0answers
13 views

WP Customizer show div

I'm working on my theme customizer and am trying to find a more efficient way of showing a div Currently, what works for me is: (this is the section) $wp_customize->add_section('social-networks'...
0
votes
1answer
47 views

Shortcode don't work in custom option field, any solution?

I have a custom field in the theme Customizer that allow to define own copyright information. I created a shortcode displaying the current year. How to make the shortcode work when someone has pasted ...
0
votes
0answers
13 views

Wordpress Customizer not allowing menu options

I am having trouble with the Wordpress Customizer. I am trying to add a page to my menu and I am unable to select anything, as seen on the right hand side with the dropdown arrow buttons. I am using ...
1
vote
1answer
44 views

How do I change Twenty Nineteen's primary color without using the color slider in the theme customizer?

Just installed the new 2019 theme. The customizer offers "default" and "custom" color options. When you select "custom", it shows a slider to pick the color, not the normal color-picker. ...
-1
votes
1answer
19 views

Echo piece of code from file

Hello I've made some options for the customizer to change where the logo is displayed and the position of it. To avoid repeating the same piece of code I'm wondering if it's possible to put the logo ...
0
votes
1answer
17 views

Adding Custom Image To Header Via New Customizer Setting

I'm trying to add a custom image setting to a custom panel/section for the header. In functions.php, I used: $wp_customize->add_setting('swag_header_logo'); $wp_customize->add_control(new ...
0
votes
0answers
16 views

Customizer textarea with script tag won't work in live preview

I have a simple textarea setup in the customizer that I want to use for including a 3rd party form. In order to embed this form I need to paste in 2 script tags into the textarea. I have an IF in ...
1
vote
1answer
21 views

What will happen to the additional CSS when the theme is updated?

I have a premium theme installed and I need to add some custom CSS to add some new styles. So what will happen if I add the CSS to the additional css section in the customize? Will I lose them when ...
0
votes
0answers
27 views

Customizer: Upload and unzip zip file in specific folder

I'm trying to upload a zip file in the Customizer that will unzip itself and contents be placed in a specific folder. So far, I have the following control in the Customizer: $wp_customize->...
0
votes
2answers
42 views

Change image using only CSS [closed]

I'm using the twenty fifteen theme. I have a logo set using the WP Customizer. I want to have the image change on mobile or tablet view. The breakpoint is anything smaller than 59.6875em. I'm ...
0
votes
0answers
11 views

How will i add an option under customizer the event calendar section?

What is the customizer section name? I want to add a field option under customizer The Event Calendar section. Or how will I add a field under The Event Calendar option? Can someone help me with that? ...
1
vote
1answer
35 views

Customizer Not Applying Any Change, No Error Thrown

I have been stuck on this for several days now. The theme customizer does not apply any change, and the problem seems to be different from everything I've seen on online forums (lucky me). The page ...
0
votes
0answers
15 views

Theme's Java Script not updating

I' am trying to modify themes Java Script using Theme Editor. But when I click save, nothing happens on my page. I use WP super cache to clear my cache but it doesn't change a thing.
0
votes
1answer
26 views

Where do I go to edit this area? [closed]

I need to edit the area shown in my photo. I am using a child theme. I am unable to ask the question to the theme's website as I don't have a proper subscription. I have tried looking at both the ...
0
votes
0answers
20 views

If customizer drop down equals, hide option?

I have an option that is a dropdown menu which let's me select between 3 different themes. And I want to hide another options if theme-1 is selected. This is the Customizer controls: $wp_customize-...
0
votes
0answers
12 views

Customizer setting dependant on other setting?

I have created a custom site template which I have settings for in the Customizer. I can select "Themes" from a drop down which are preconfigured backgrounds. However I want to be able to upload a ...
0
votes
0answers
16 views

Is it possible to ad custom block areas through Customizer that would allow adding Gutenberg blocks?

Is it fundamentally possible to create a custom area through Customizer that would allow adding Gutenberg blocks. Similar to a widget area but one that can be managed through Customizer panes and ...
-1
votes
1answer
23 views

Page structure using The Customizer Api

so I'm trying to customize themes using The Customizer Api, and I've noticed that I can only change the css, is there a way to control the page structure and layout (HTML) ?
1
vote
0answers
8 views

Add media library items to Menus using the Customizer (via Media Manager not URL)

You can add links to files in the media library URL via the Custom Links panel of the Customizer but for clients this requires multiple steps including cutting and pasting a URL from the media library ...
0
votes
0answers
32 views

Customizer Preview doesn't refresh functions

I'm having an issue where the Customizer Preview doesn't seem to fully refresh, but if I manually refresh the page the changes work. I've made a simplified example of the issue I'm experiencing: I ...
0
votes
0answers
28 views

Slider in Customizr randomly lose content

I have a problem concerning a Slider in Cusomizr (WP theme). Only in Chrome and Safari on particular Computers I obtain bizarre error. It looks like this: The content of a slider becomes grey, ...
0
votes
2answers
101 views

Woocommerce image sizes missing from Appearance › Customize but not declared by theme

I would like to resize the 100px x 100px store thumbnail images. The sizes are supposed to be set under Appearance › Customize › WooCommerce › Product Images These size settings are missing. After ...
0
votes
1answer
10 views

Changing Customizer Select To Checbox, But Retaining Classes

On a custom theme I had made, I had some options like so: $wp_customize->add_setting('swag_header_display_homepage', array( 'default' => 'header-display-homepage-yes' )); $...
0
votes
0answers
30 views

Wordpress customizer extremely slow, cant work in it

I have been adding a couple of settings to my Wordpress admin using this code: $wp_customize->add_section( 'sectionname' , array( 'title' => __'Name', 'priority' => 80,...
1
vote
1answer
14 views

How do I make HTML output work when using the customizer?

How do I make HTML code that is written in the customizer output properly? I need a line break to appear where it has been placed but I am not to get it to output properly.
0
votes
1answer
25 views

How to alter static Page text through the Theme Customizer API

I am fairly new to Wordpress development so I apologize for my ignorance. How can I alter the static information on my pages (IE not entries or page content) through the Theme Customizer API? Is it ...
0
votes
0answers
13 views

How to show users with have role in separate menus in wordpress admin panel

In users menu Wordpress admin panel, for default shows all users with all roles in a menu. I want to show users with have role in separate menus in wordpress admin panel. For example each users have ...
0
votes
0answers
24 views

Wordpress appearance button

Is it possible to place an appearance button on wordpress site. For example to make background bit dark or bit light or other colour. This feature is available on native apps. If it can be done on ...
0
votes
0answers
19 views

(Parent) theme Is Not Showing In Theme Selection Panel and Therefore Breaks Child Theme

I'm a WordPress developer but this one has left me scratching my head... I've got a parent theme and a child theme. Works great on my local machine, and was working great on my live server. However ...
1
vote
1answer
21 views

Theme customization based on grouped pages

I have a page (currently not yet Wordpress) with 20 pages, categorized in 5 groups and every group has it own group image in the header of the page (outside of the content). Every page in a category ...
0
votes
1answer
40 views

Why is remove_setting and remove_control not working?

I've renamed my theme folder and all other title related bits, but I had a long list of settings and controls that were added with labels related to the old name, I want to remove these. I believe I'...
0
votes
1answer
296 views

Override theme style rule in Gutenberg

I have a theme that adds the following CSS rule inline through the Customizer to style the hover state of links in post content: .entry-content a:hover { color: <color selected in the ...
0
votes
2answers
29 views

Child theme customizer preview doesn't work/load

Quick heads up, I know nothing much about php so I might need some extra help with this. So, I have set up a while ago a child theme for Astra in Wordpress. And while everything is working well so far,...
0
votes
1answer
34 views

How to check if a Customizer setting is set?

I'm trying to setup a function that writes a meta tag into the header of my site. Namely, I've set up a color chooser input like this: function customizer_options($wp_customize) { $wp_customize ...
0
votes
1answer
57 views

How to add “get_theme_mod” inside a shortcode?

I want to make dynamic the content inside a shortcode so I can modify it in the customizer. I created the customizer tabs. Now, I want to create a shortcode to place it anywhere in the page while ...
1
vote
0answers
63 views

How to Get WP_Customize_Image_Control content?

I want to get WP_Customize_Manager controls from my frontend with ajax. This is possible? I looking for a solution on the internet, but I have not found so far any useful documentation about this... ...
0
votes
0answers
16 views

Customizer control for including files in functions.php

I have the following include in my theme's functions.php file to add social sharing icons to my theme: require get_template_directory() . '/inc/social-sharing/social-sharing.php'; I would like the ...
0
votes
0answers
18 views

Kirki Customizer radio control

I'm using "kirki customizer", the homepage consists of a few styles (for example: homepage-1, homepage-2). How to use Kirki customizer-da radio control, how can I use it?
0
votes
0answers
25 views

Initial Customizer is_admin() but loading preview is neither is_admin() nor is_customize_preview()

When clicking from wp-admin into the Customizer, WordPress loads the Customizer (where is_admin() is true) and then loads all of WordPress a second time in order to generate the preview iframe, in ...
1
vote
1answer
29 views

WordPress code editor VS customizer “built-in CSS editor”?

I needed to make some CSS changes to my WordPress site (child theme) earlier and opened the WordPress editor inside "Appearance": Appearance > Editor > someCssFile.css Inside the editor page, ...
-1
votes
1answer
18 views

How to display specific title on Customizer?

Please find the below image. It will be more clear to understand my question. I want to display the title that has been shown on above image in the Customizer. How can I do that?