5.9RC1, Twenty Twenty-two theme: WP_Customize_Control live preview problems
-
I have a plugin that allows a user to modify plugin settings using the customizer. I find that using WP_Customize_Control to update the plugin setting is not working properly when the Twenty Twenty-Two theme is used. The setting can be updated within the customizer, but the customizer live preview does NOT get updated with the new setting. If I save the changes and exit the customizer, I find the setting did update even though the preview didn’t show it.
Note this only fails with Twenty Twenty-two block theme. If I use an older theme it works properly.
My plugin is not in the repository, so I looked for some examples with similar problems:
1. I found that the built-in Additional CSS rules have a similar problem. So I disabled all plugins except Yoast SEO Plugin so that the customizer would be added to the menus. Then I used the Additional CSS tab to add a rule h2 { background: orange;}. This is displayed on the current page fine. Then navigate to the home page by clicking the link in the site title and the custom CSS is lost. After about 30 seconds the custom CSS starts working from this link.
2. Another example is the Yoast SEO breadcrumbs customization. I find the setting changes do not update in the live preview, similar to my plugin.
- The topic ‘5.9RC1, Twenty Twenty-two theme: WP_Customize_Control live preview problems’ is closed to new replies.