Is it possible to tokenize theme options to make them available to the basic site editor

Ok through much research, I came up with a way to do this through my theme without having to create a separated plugin. First I set the options in the back end (I am using Redux Framework WP Plugin): <?php Redux::setSection(‘z_theme_opt’, array( ‘title’ => esc_html__(‘Page Tokens’, ‘z_theme’), ‘id’ => ‘opt_page_tokens’, ‘icon’ => ‘dashicons dashicons-html’, ‘fields’ … Read more

How to show associated fields if checkbox is checked in customize widget screen using wp_customize?

This is possible with JavaScript. You have to add an event listener to the checkbox and then show/hide the inputs depending on the checked state. Here is an example: checkbx = document.getElementById(“checkbox-id”) input1 = document.getElementById(“input1-id”) input2 = document.getElementById(“input2-id”) checkbx.addEventListener(“change”, () => { if(checkbx.checked){ input1.style.display = “block”; input2.style.display = “block”; }else{ input1.style.display = “none”; input2.style.display = … Read more