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.

Filter by
Sorted by
Tagged with
1
vote
0answers
11 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
2answers
1k 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
39 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
70 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
19 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
46 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
28 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
23 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
246 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
1k 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
157 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
447 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
364 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
110 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... ...
1
vote
1answer
141 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
214 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?
0
votes
1answer
33 views

Woocommerce section name? [closed]

What is the customizer section name? I want to add a field option under customizer woocommerce section. Or how will I add a field under woocommerce option? Can someone help me with that?
0
votes
1answer
268 views

“Display Site Title and Tagline” checkbox without adding Header Image option

I'm building theme from scratch. I want to add "Display Site Title and Tagline" checkbox bellow Site Title and Tagline I can do that If I add the following code to functions.php add_theme_support( '...
0
votes
0answers
33 views

In 2016 Theme where is the Posts page thumbnail image stored?

We built our new site at a staging URL. We then moved it to the live site and everything works fine -except- for the 'Posts' page. On that page, the image specified as the thumbnail continues to ...
0
votes
2answers
182 views

I need to get the control choices to sanitize_callback

Code Currently, I'm working project to automatically generate all my theme customizer options with simple array. 'nav_font_style' => array( 'default_options' => array( 1 ...
2
votes
2answers
578 views

How can a default site icon be set in customizer?

From my research there are only two questions I've found around this topic on this site: How to change in customizer the “site identity” tab required capabilities how to change default icon of custom ...
0
votes
1answer
605 views

Creating default object from empty value in wp_customize?

I have the following code on line 315 and 316 of my theme file customizer.php For some reason I get error in my error_log file in the root of the installation. Everything seems to work fine though. $...
4
votes
1answer
2k views

How to print the value of a custom control in the Customizer?

To the Customizer section of my WordPress admin area, I have added a custom setting and custom control. I would like to now print the value of this control. How can I do this? The code used to add ...
1
vote
1answer
588 views

How To Remove or Hide Appearance->Background from Admin Menu

I have a menu Appearance->Background on WP admin, i want to remove or hide from Editor user. i was try to using public function remove_menu() if( !current_user_can( 'administrator' )){ { if( !...
2
votes
0answers
96 views

How to check if customize previewer is refreshing?

I am trying to send data from customize control to customize previewer. The scripts work fine until the customize previewer is refresh. The problem is only the previewer is refresh, the customize ...
0
votes
1answer
368 views

How do I remove header/page-title image in farvis theme? [closed]

I'm working with farvis theme. In that theme I removed background image in customize >> page titles & Breadcrumbs >> background image >> remove. But after I clicked save and reloaded the site ...
0
votes
1answer
27 views

Allow user to choose header style

I am working on developing a simple WP theme that our office will use as a starting point for any future projects that come in. My question is this: How would I go about adding functionality that ...
0
votes
2answers
303 views

How to show Custom Field Value in Woocommerce Shop Page

remove_action('woocommerce_shop_loop_item_title','woocommerce_template_loop_product_title',10); add_action('woocommerce_shop_loop_item_title','fun',10); function fun() { echo 'custom_field_value'; } ...
0
votes
1answer
25 views

Wordpress Theme Customization error

On customizing Newspaper theme in Wordpress the page stops loading. Following errors can be seen in the console. I disabled all the plugins to check if it's a problem with any of them. But still, ...
1
vote
1answer
275 views

How do I get current page ID in Wordpress customizer file?

I'm trying to hide or show customizer settings based on what page I am viewing similar to active_callback' => 'is_front_page', however, I haven't found a way how to access the current page ID from ...
0
votes
0answers
108 views

Javascript when Customizer preview is ready/refreshed?

I am trying to create a javascript which fires everytime the preview iframe is refreshed. I have found this one: wp.customize.bind('ready', function () { }); But this only works when the Customizer ...
0
votes
1answer
21 views

Remove button from page if viewed through Customizer

Is it possible to remove a specific button from the page only if it is viewed from the Customizer? I did try a check for wp-customizer in body, but this only checks the body of the iframe and not the ...
2
votes
2answers
486 views

wordpress custom theme import and export options for sample data [closed]

I am Created WordPress custom theme as per Html template. it was worked fine. now I am trying to create custom export/import functionality for my custom created theme. but I don't have found a better ...
0
votes
1answer
172 views

wp_head makes my custom page template not work in Customizer?

I have a weird issue where if I am in the Customizer and visit a page which uses a custom page template I made it doesn't load the site in the preview. But I can see that it loads in the console. I ...
0
votes
1answer
217 views

Trigger Customizer Publish (save) Action

Is there any way to trigger the Customizer's Publish button in javascript? The use-case is to create a secondary save button within a section.
1
vote
2answers
4k views

Hide Theme options and Customize Admin menu

Under the appearance admin menu, I have customizer added by the theme, and theme options added by a plugin. I'm using this code to hide both menus ( submenu's of Appearance )for ALL admins apart from ...
1
vote
0answers
19 views

Child Theme disable customizer defaults

I am trying to extend twentyseventeen theme. I want to achieve two simple goals. No custom header image Don't show the Title and tagline by default. But I would like to keep those options available ...
0
votes
1answer
44 views

Remove specific javascript when viewing page in Customizer?

I have a javascript which reloads the page when content change is detected. This is the behaviour I want on the main site. But when I use the Wordpress Customizer I don't want this behaviour as it ...
1
vote
1answer
281 views

Count top level menu items

I need to get count of top level menu items. I have menu with 5 items and of of them has 1 submenu. This is current situation, but the user using the theme I am building may have some different ...
0
votes
1answer
397 views

Edit style.css via theme customizer

Till now in my Wordpress themes, I was implementing few necessary styling options in theme customizer which would edit the CSS and override it by outputting that CSS to head inside <style> tags, ...
-2
votes
1answer
206 views

Refresh Customize Section (not preview)

I am building controls (a) that are generated using a value from a control (b) in another section. However, unless the full customize page is refreshed then then there doesn’t seem to be a way to ...
0
votes
1answer
82 views

Customizer add query to preview URL

In some part of our customizer we are redirecting users to some specific pages. var url = 'https://test.com/specific-page'; api.previewer.previewUrl.set( url ); We want to pass a custom query along ...
0
votes
0answers
54 views

WordPress panel is not loading after plugin activated with error: HTTP ERROR 500

when i try to activate Yoast Seo Plugin, my WordPress panel stop loading and the browser displays: HTTP ERROR 500. I checked my error_log file and there was this error: call_user_func_array() expects ...
0
votes
1answer
137 views

Customizer Get Control Choices on Change

I have a customizer RadioControl with 3 choices: menu-left, menu-right, menu-top. I want the chosen setting to be added to the body as a class, while the others are removed. Example <body class="...
0
votes
1answer
25 views

Change default color scheme in twentyfifteen child theme?

I read the previous ask about this. And tried renaming my scheme to "default" and it didn't work. I am implementing the child theme on 50+ blogs on a network and I would like to just click "Activate" ...
0
votes
1answer
111 views

Sidebar visibility in {WordPress template Hyerarchy, Newspaper Theme, TagDiv Composer}

I have to admit that I often find Wordpress not so intuitive but let me explain what I mean in this specific case: The right sidebar is not whowed on the homepage? Why? How can it be? But ok.. let ...
1
vote
1answer
277 views

Bind JS event to Wordpress control customizer

I want to bind a click event to Wordpress custom control (Theme Customizer). I have tried with (customizer.js): $(document).on('click', '.element_class', function () { console.log(5); }); , but ...
0
votes
1answer
10 views

Exiting Customizer alert

I get an browser alert when exiting Customizer that my changes will be lost if I navigate off this page. Everything is saved in customizer, so when I navigate back to it, it shows the logo and ...
2
votes
1answer
176 views

How to hook on customizer section expanded/active/opened event?

I am trying to run js function when customizer section is expended and cant seem to find any event to do so. Something like this wp.customize.bind( 'ready', function() { wp.customize.section....

1 2 3
4
5
18