问题标签 [theme-customizer]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
22 浏览

arrays - Wordpress 定制器 - 为另一个控件使用设置值

可能有几十种更好的方法可以做到这一点,但我仍在学习细节,所以我从基础开始。我正在尝试为徽标设置一个范围(工作),该范围仅与标题部分设置的一样高。

AKA,因此,如果标题设置为较小的尺寸,我的徽标图像无法超出标题并溢出到标题之外。除了能够调用 header_height_setting 作为我的数组的最大值之外,我一切正常。

任何和所有的帮助表示赞赏!

编辑:没有给出错误,'header_height_setting' 只是没有按预期用作最大范围。比例的 [max] 似乎默认为 100px 的滑块。

我的设置

他们是怎么称呼的

0 投票
0 回答
27 浏览

php - Wordpress Customizer HTML manipulation and dropdown menu

I'm trying to add a section in the wordpress customizer with a few different "subsections" in a dropdown menu. Like in the following image:

enter image description here

I would like to open a subsection when you make click on "H1", for example, with some new controls. I know how to use add_panel, add_section, add_control but not how to manipulate the html code of each section. It's possible because i saw it in several themes and plugins but i can't find any way to do it. I was thinkig to add some html blocks and hide/show by jquery with the customize_controls_print_footer_scripts but javascript functions doesn't seems to work properly. It's frustrating because i cant find any information about that on internet

0 投票
0 回答
21 浏览

php - 获得最多 3 个变量的输出

我需要帮助。我有 3 个设置,每个设置都有几个不同的值。如您所见,我有 3 个 $font_weight 设置。

$font_weight 有 3 个输出值。

$font_weight2 有 2 个输出值。

$font_weight3 有 2 个输出值。

入队的 CSS 文件命名如下,例如“open_sans400.css”。

我希望你明白我的意思。如果您不明白,请提出问题,以便我们找到解决方案

0 投票
0 回答
42 浏览

wordpress - 定制器 api (postMessage) 中的复选框无法正常工作

我在 single.php 中显示作者信息

我在定制器和 postMessage 方法中使用了一个复选框,我有必要的 js 文件包含在

之前在定制器中检查时,它工作正常。但是,如果我取消选中它(不显示模板部分),发布然后刷新页面,即使我选中复选框,它也不会显示模板部分。如果我选中复选框,发布,然后刷新页面, postMessage 方法再次正常工作。我找不到关于我做错了什么的答案,希望你们中的一些人能给我指路。这是我的定制器设置:

我的customize-preview.js:

我在 single.php 中调用模板部分的部分:

最后是我的 /template-parts/single/author.php 文件:

我希望我能把这个问题告诉你。谢谢阅读。

0 投票
0 回答
13 浏览

wordpress - Colormag wp 主题页脚自定义

我想删除显示在 wordpress colormag 主题页脚处的“由 wordpress 提供支持”,但我不能。我在 footer.php 文件中找不到任何可以编辑以删除它的信息。请问我该怎么做

0 投票
0 回答
25 浏览

php - PHP函数中的非法字符串偏移

当我尝试从 wp_customize 设置输出一些多个复选框选项时,我收到非法字符串偏移警告。

然后我尝试像这样输出,但我收到非法字符串偏移警告: