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
0
votes
0answers
7 views

Categories for custom posts not showing up

I am using Hello Elementor theme with Elementor Pro plugin. I have used Posts widget to show "custom post type" on a page. With posts widget I was able to get Title, Excerpt, Meta Data but ...
0
votes
1answer
12 views

Wordpress Include 'print_f' in WP_Customize_Control array

I have the following problem: I want to add print_f in an array in wordpress. printf( __('Option to share on %s', 'themename'), 'name') However, the following code does not work properly for me. ...
0
votes
1answer
12 views

Easily add custom HTML outside the main container?

My theme has set the max-width of the main container smaller than the screen size, and I'm searching for a way to override that in order to add a fullscreen video background. Is there a relatively ...
0
votes
0answers
27 views

customizer postMessage transport doesn't update in javascript

in the absence of any significant official documentation for javascript in wordpress, namely the wp object I am having hard time applying postMessage customizer controls (despite all the assurances in ...
1
vote
0answers
23 views

Theme-wide custom post template

I am writing a custom theme. It has several custom post/page templates, which are selectable from the drop-down on the Edit Post/Page page. Is it possible to make a theme-wide Customizer setting that ...
0
votes
0answers
16 views

Show a Setting From Theme Customizer Under Every Blogpost

I've added a custom setting in Theme>Customize using Theme Customization API. Now, my client wants that setting (text) to show at the end of each & every blogpost. Please help. My Current Code ...
0
votes
0answers
10 views

How to remove html tags from output with json_encode in Wordpress? I want to show only plain text

I've been on trial and error for a few days, researching a lot, but I can't solve this problem. objective: this function generates schema output for data structured in JSON. the problem: the texts are ...
0
votes
0answers
13 views

Dynamic media query

In WordPress how can I modify the media query screen size? Say if I have a customizer option for mobile size : 600px and the in CSS this value should change. For javascript, there is wp_localize and ...
0
votes
0answers
17 views

How to add a class name at visited links in wordpress

See the sidebar of the image. I want to add a class name in the visited post link. Like when someone clicks on Web Design, the Class name will be added in li tag of Web Design. Here is the code of ...
0
votes
0answers
15 views

Block template not being included in pages created in the customizer

I have a block template set up so that my custom block (built using ACF) is automatically added to the top of each new page: function jmc_register_page_template() { $post_type_object = ...
0
votes
0answers
26 views

Tinymce in WordPress customizer

I have the TinyMCE editor working on one control in the WordPress customizer. The problem I am having is getting it to work when there is more than one field. I need them to update with the live ...
0
votes
0answers
10 views

wp.customize bind not working

I have registered a setting/controls and partial refresh with dynamic JS API. Have added a customizer preview to change the color like below, wp.customize( control, function( value ) { value.bind(...
0
votes
0answers
9 views

customize_preview_init: listening for any changes from dynamically created control

When created settings and controls dynamically from Javascript it is working fine with partial refresh. But when setting my_control value to a new one programmatically without partial refresh ( ...
0
votes
0answers
19 views

Wordpress Customizer Dynamic Partial rendering with dynamic settings

Dynamically added controls/settings refreshing the customizer preview. Here is the JS: api.bind('ready', function () { // Create theme options panel. api.panel.add( ...
0
votes
1answer
24 views

Impossible to declare box-shadow with wp.customize?

I'm trying to put a section in the customizer where you can choose how to put a box-shadow in a h1. The problem is that i need to write the whole box-shadow box at once, is not like border where you ...
0
votes
0answers
24 views

How to add custom settings to the 'WooCommerce' section from Customizer?

I want to add some custom settings in the pre-existent WooCommerce section of the Customizer. How can I do that?
0
votes
0answers
15 views

WP Customizer - How to change theme mod with live preview? When using `remove_action()`

I've made a theme customizer setting that hides the meta data on a single woocommerce product page. When I save the setting and go out of the customizer I can see the setting takes effect. So that ...
0
votes
1answer
63 views

Output foreach loop used in Wordpress wp_customize

I'm trying to dynamically output some settings from theme Customizer. I use this custom controls, Example 3. How can I output the settings so that the selected options appear as well as in the order ...
0
votes
0answers
16 views

Unable to Auto Post In Buddy Press Activity from Elementor-Pro Form

I seek help with Wordpress usecase that I am unable to accomplish. I have created a Elementor Form in Pop up with a field File Upload. When I click on upload button, I want to show the uploaded image ...
0
votes
3answers
42 views

Customizer Color Control Not Working

I am currently developing a theme which provides more customization in Customizer. I am trying to add color control option and it is not working. This is my code. /* Color Section */ $...
0
votes
0answers
16 views

How to enable admin to upload multiple images to support header carousel slider theme in WordPress?

I am creating a Bootstrap Carousel WordPress Theme. Thus Carousel Slider at the top of the pages is a part of theme which should be supported out of the box. That's why creating a separate plugin ...
0
votes
0answers
27 views

Issues with wordpress watermark

I'm adding a watermark to a WordPress featured image of a post submitted by me by clicking on a button on the front end which is visible only to the person who submitted that post. That button calls a ...
0
votes
0answers
23 views

Theme Customization with WP CLI

It seems we cannot say Hi here, However, I search on the documentation, and the github, however i don't find any information about customization of theme through WP CLI. Is it possible to do the same ...
0
votes
0answers
10 views

how to edit a different page by using WP Customizer not only home page

I'm working with Customizer's it's really powerful. I'd like to extend it, so instead of editing only the main page, I want to allow editing of inner pages. Does anybody have the solution? Below code ...
0
votes
0answers
18 views

dokan edit functionality

how can we have a functionality that every vendor inputs whatsapp number, and when customer need they can chat on whatsapp with any product vendor, enquire them also can place order on whatsapp, Will ...
0
votes
1answer
31 views

require get_template_directory() . 'path/to-my/file.php' BREAKS customize > themes functionality

hope to get some help, please <3 i'm building a theme from scratch as an exercise to learn WP and PHP, using WP commercial themes (GeneratePress and WP default themes) as a guide. when i use: $...
1
vote
1answer
24 views

Add more then one site logo - custom-logo theme support

We can add one site logo to site customize with add_theme_support( 'custom-logo' ); How can add another logo? Seems like the custom-logo theme support only allows to add one site logo and I need to a ...
0
votes
0answers
9 views

Can wp.customize() receive multiple values for the first parameter?

I am trying to find a way to add multiple values for the first parameter of wp.customize. Here's my function: wp.customize('_themename_accent_colour', (value) => { value.bind( (to) => { ...
0
votes
2answers
44 views

Customizer - binding jQuery created controls

I tried several plugins posted by Weston Ruter for jQuery created controls for the WP Customizer. They work but are different from those created via PHP. For example, controls created with PHP (...
0
votes
1answer
61 views

Customizer options limited to specific user roles?

Is it possible to limit the selection of a specific customizer option to user roles? Right now I have this custom control: $wp_customize->add_control( 'checkin[theme]', array( 'label' => __('...
0
votes
0answers
15 views

Customizer custom controls with mobile/tablet/desktop options embedded

I wonder if there's a way to create an custom control (say a slider/range control to set a padding value) that also includes options to select the device width (mobile/tablet/desktop) - so if I click ...
0
votes
1answer
29 views

modify menu item links dynamically

on our wordpress site we use utm_source in the querystring to determine the campaign that brought a customer to our site. I need to dynamically add the passed utm_source from the initial page to all ...
0
votes
0answers
24 views

@font-face in Customize Control

I've extended the WP_Customize_Control for displaying a <select> dropdown for fonts available in my theme (downloaded from Google Fonts and provided locally for privacy reasons). In order to ...
0
votes
1answer
27 views

Linking to a Customizer control

I am trying to set up a link that automatically takes the (admin) user inside a Control that is inside a Panel in the Customizer. Panel: Control: Here's the URL I currently have: admin_url( '...
0
votes
0answers
23 views

wp.customize is undefined in customizer scripts

I have some scripts I am loading in the customizer like this: add_action('customize_controls_enqueue_scripts', function() { wp_enqueue_script('jquery'); wp_enqueue_script('json-editor', 'https:...
0
votes
0answers
18 views

How to add dependency to customizer input field depending on previous selection?

I have created a customizer that creates buttons for the front page banner. There is the option to select 1 or 2 buttons. I want the fields for the second button to be hidden if it's not selected. // ...
0
votes
0answers
21 views

Can I add customizer to a custom made wordpress theme and have those styles in a CSS file?

I would like to make my colours, logos, and hero images all dynamically changable using my customizer.php. I haven't played around with customizer much, but understand I need to use php to store the ...
0
votes
1answer
33 views

Removing element from DOM with jquery through plugin Custom Scripts for Customizer

This is my first post. I have the plugin powerpress loading an external image from an unsecure source that causes mixed elements so the page is not fully secured and I get the message "not fully ...
0
votes
1answer
21 views

Why does wp_customizer default values do not apply when theme is installed for the first time?

I am creating WordPress themes, when i install theme on another site / domain, the default values added under wp_customizer do not apply for the first time when theme is just installed. When i go to ...
0
votes
0answers
26 views

Add custom control though JS customizer API

I have tried to add controls through JS customizer API. It is not working for the custom controls where as WP controls like text, number it is working fine. api.control.add( new api.Control( 'my-...
0
votes
0answers
20 views

How to register controls/settings and partial refresh from Javascript?

I have managed to convert sections/panels/controls from PHP to javascript. When I am registering custom controls through JS it was not working and not sure about the settings and partial rendering. ...
0
votes
2answers
110 views

WP 5.5, child themes, customizer and a weird cache issue

Update: I created a fresh new installation of WordPress, copied both Base and Base Child themes and activated Base Child. The Appearance/Customize gives the same white screen as described in point 1 ...
1
vote
2answers
142 views

WordPress Customizer - pass setting value into another control to live update drop-down choices

In the WordPress customizer script, I am trying to pass the value from a select control into a custom control that displays taxonomies associated with the selected value (1st control). $wp_customize-&...
0
votes
1answer
14 views

Can't Customize Wordpress Page

When I click to customize my page, I get the spinny wheel. I've tried restoring to previous days on my site, but am having no luck. Thank you for your help.
0
votes
1answer
476 views

How to disable cropping of the site icon?

Is it possible to disable the cropping step when adding a site icon via the Theme Customizer in WordPress 5+ (occurred to me in 5.5)? For me cropping is unnecessary because I always upload a square ...
0
votes
0answers
13 views

Edit with elementor not working!

i use elemetor based theme and now the edit with elementor option doesn't work. But when i change the slug of the page it will work. but within the old slug it will not. what is the issue? anyone ...
0
votes
0answers
13 views

how to change demo theme

I purchased the high end theme and imported 3 demos (Main, Bloggera and Presentation). How do I change from one template to another? Only the Bloggera is appearing.
10
votes
1answer
581 views

Add settings to menu items in the Customizer

WordPress 5.4 added the wp_nav_menu_item_custom_fields_customize_template hook to add custom fields to the Nav Menu Item settings in the customizer. I've figured out how to display the additional ...
0
votes
0answers
7 views

Wodpress Customizer Selective Refresh Div with respective Javascript and Localized data

There is a div with the selective refresh which is having a javascript to make some changes. As due to selective refresh HTML is dynamically updating hence respective javascript stops working as it ...
0
votes
0answers
12 views

Are there Wordpress user capabilities needed for the customizer?

I'm creating a theme for Themeforest and in their requirements they say that I should use the functions current_user_can to determine if the current user has certain capabilities. For me this would ...

1
2 3 4 5
18