Dequeue theme stylesheets but keep widget styling on custom page template

You would have to enqueue them at the same time you dequeue all the other items, assuming your widgets have separate stylesheets. You can’t selectively enqueue sub-portions of a stylesheet, and there is no method of identifying which stylesheets contain the widgets. Depending on the theme the widgets may not be in their own stylesheet, … Read more

How to display a value from a radio button in the options menu in wordpress

Your form is sending data using POST method, so you should receive selected value of radio button in $_POST[‘colorSelect’]. To simply display it you can use: if(isset($_POST[‘colorSelect’])) echo $_POST[‘colorSelect’]; else echo “Nothing selected”; To save it to options table use following code at the start of your function colorSelector(): if(isset($_POST[‘colorSelect’])) update_option(‘colorSelect’, $_POST[‘colorSelect’]); So you can … Read more

is it possible to use post-type as part of a css selector in block editor stylesheet?

In the meanwhile I posted this question also on Stackoverflow. I got a hint in a comment to the question which led me to a solution. I didn’t find a pure CSS solution, but used the following jQuery script to add according classes dynamically: $(document).ready(function() { if($(‘body’).hasClass(‘post-type-page’)) { $(‘#editor’).addClass(‘post-type-page’); } else if($(‘body’).hasClass(‘post-type-post’)) { $(‘#editor’).addClass(‘post-type-post’); } … Read more