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

In wordpress customizer div still showing even if I hid it with javascript

I am loading a div in my single.php based on a setting in the customizer. It all works fine in the front-end as expected. But in the customizer that div is still showing even if the setting is ...
0
votes
0answers
12 views

what is the best way to use postMessage refresh in customizer to load a template part using get_template part()?

Let's say I have a checkbox in the customizer. I want to load a file : /template-parts/components/author-info by this: if (get_theme_mod('show_author_info')) { get_template_part('/template-parts/...
0
votes
0answers
9 views

Customizer API postMessage not working when previously unchecked

I'm showing author info in single.php with <?php if ( get_theme_mod( '_themename_display_author_info', true) ) : get_template_part( '/template-parts/single/post-navigation' ); endif;?> I'm ...
1
vote
0answers
17 views

How to send all theme_mod customizer default values to the database upon theme installation?

I'm building a new theme with many customizer settings, which all have default values. I need these default values to be sent to the database immediately upon theme installation, so that they appear ...
0
votes
0answers
17 views

Change a customizer control based on another control's value dynamically

I am creating a Google Font Control in Customizer. I have created a custom control with two settings - one for font-family and other for font-weight. There will be select dropwdowns for both of them ...
0
votes
0answers
11 views

add partial menu and widget in customizer

I added a minimalistic php code to the function.php. this is a menu and a widget. both should be changeable as quickly as possible. the logo has a pencil icon. this allows you to quickly access the ...
0
votes
1answer
16 views

how to enqueu customiser/customizer scripts?

my script has one line wp.customize.control('control_id').deactivate() the control DOES exist. as an evidence I inject the above code directly into the browser consol and it works (the control ...
1
vote
0answers
16 views

How to customize a regular user's page

I am new to wordpress. At first I thought the "customizer" is just for newbies who need a WYSIWYG page editor and I should be able to change any setting without using the customizer. Later, ...
0
votes
0answers
14 views

Auto-expandable search box and pre-loader progress bar in CSS

I am not very familiar with WordPress and CSS, however, I am trying to describe the scenario. my system info is mentioned below: php 8.0.7 WordPress 5.7.2 woocommerce 5.4.1 elementor pro 3.3.1 theme: ...
0
votes
0answers
4 views

Mini cart list style?

i got some problem with my mini cart. I use apus thème-tumbas The dropdown from the minicart is different if i'm on main page , product page or cart page. I dont Know why .. All those pictures are ...
0
votes
1answer
18 views

How can I override file featured-image-first.php of Avada theme [closed]

I use the Avada theme, and I have created a child theme (Customweb) for it. I tried to override the file: wp-content/themes/Avada/includes/lib/inc/templates/featured-image-first.php And I try create ...
0
votes
1answer
26 views

CSS properties in textarea in the Customizer

I am trying to create a custom field (text/CSS code in textarea) that include the CSS suggestion like Additional CSS in the customizer: https://i.postimg.cc/9QhLPgVk/image.png. Does everybody has ...
1
vote
1answer
27 views

How to set a default color for the WordPress Customizer’s color picker?

I'm developing a WordPress theme in which I'm adding a color control to the Customizer’s “Colors” section, so that the user can customize the footer’s background color. I added a functioning color ...
0
votes
0answers
18 views

How can I add transparent color option in my color setting?

I have created font color settings at customizer but it does not include transparent color, How can I add transparent option also. class site_font_color { public static function register ( $...
1
vote
1answer
26 views

Wordpress on a local machine redirecting to xampp dashboard page [closed]

I just decided to learn Wordpress, I created new site successfully with name of 'unique-university' using flywheel but when I click 'OPEN SITE' It redirect me to Xamppp dashboard page 'http://...
0
votes
0answers
18 views

Is there a way to load translations from .PO and .MO files for Customizer strings?

I would like to ask if there is a way, a filter or a hook that lets us display the translated strings of the Customizer options. For example, most WordPress themes provide translation files in the ...
0
votes
0answers
18 views

How to make a block for header font styling at customizer via function.php?

I am trying to make a section block to change font size at the customizer for the header, I can change font color with generate_css but not able to change size? my code for changing color is bellow, I ...
0
votes
0answers
10 views

Add custom field to specific page / template admin conditionally - based on customizer value

I'm just learning to use customizer and want to be able to display the meta boxes for specific custom fields in the admin section for specific pages or page templates, based on a value that has been ...
0
votes
1answer
20 views

Wordpress Include 'print_f' in WP_Customize_Control array [closed]

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
15 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
38 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
24 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
17 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
18 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
16 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
48 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
13 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
31 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
30 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
69 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
19 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
103 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
20 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
28 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
31 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
19 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
45 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
48 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
89 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
17 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
30 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
27 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
38 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( '...

1
2 3 4 5
18