How to disable the gradient and font size internal CSS added by WordPress when using theme.json
How to disable the gradient and font size internal CSS added by WordPress when using theme.json
How to disable the gradient and font size internal CSS added by WordPress when using theme.json
My current solution is to create a directory outside the child theme that includes the CSS, JS, and php files for customizations This is a plugin, a folder containing PHP/JS/CSS, with a comment at the top of one of the PHP files that has /** Plugin Name: XYZ at the top of the file. <?php … Read more
To avoid types with no results you can e.g. one additional time go through the loop and count the occurrences of each type, the number of returned results is not large (only 10 per page) display the type title when you encounter the first post with the given type (move to inside while loop, I … Read more
I would recommend having two static Pages for this arrangement: The static page to serve as the Placeholder for your site front page The static page to hold the content you want to display as an excerpt on the front page Then, in front-page.php, you simply query static page 2 above, and output post-excerpt and … Read more
Parsing and modifying HTML properly using the standard PHP library is quite a pain. There are many gotchas. Here’s a well documented example that will add the img-fluid class to all images in the content. To ensure that the doctype and HTML tags are not added to the HTML fragment a solution from this StackOverflow … Read more
You’re close. You just need to replace changeTheChoices() with set() as this is a method on wp.customize.Setting. See the following which also refactors a bit: wp.customize( ‘setting_category’, ‘setting_font’, function( categorySetting, fontSetting ) { categorySetting.bind( function( category ) { var newChoices = {}; // get new data from JSON using ‘category’ and populate the ‘newChoices’ fontSetting.set( … Read more
require_once ‘wordpress/wp-load.php’; wp_footer(); Maybe you have to remove some things from the footer-file (e.g. Powered By WordPress). With var_dump( $wp_actions ); you can see which actions was executed (a list of action hooks). And with var_dump( $wp_filter[‘wp_footer’] ); you can see which actions are registred for the specific hook (here wp_footer).
I would recommend that you have your theme require the wordpress.org version of the wpaudioplayer plugin. There is a great article about having themes check for and require plugins. As is well-argued on this WPSE answer, it’s not a great idea to take code from a plugin and include it in your theme because you … Read more
According to Codex, this function accepts 2 arguments: <?php wp_add_inline_style( $handle, $data ); ?> Take a look at this example: function my_inline_css() { wp_enqueue_style( ‘custom-style’, get_template_directory_uri() . ‘/css/custom_script.css’ ); $btn_color = esc_attr( get_theme_mod( ‘my-custom-color’ ) ); $custom_css = ” .btn-default{ background-color: {$btn_color}; }”; wp_add_inline_style( ‘custom-style’, $my_custom_css ); } add_action( ‘wp_enqueue_scripts’, ‘my_inline_css’ ); You should have … Read more
I think the plugin you mention is the one I wrote so if you’re looking for answer on how to do it take a look at the code. http://wordpress.org/extend/plugins/dropdown-menus/ Essentially all I did was create a custom menu walker class so I could output the menus created in the backend as a dropdown. If it … Read more