Gutenberg – Title field required

You could use PluginPrePublishPanel to check for the title and lock publishing if it’s empty. Have a look at the accepted answer here for an example of locking the post – Add pre-publish conditions to the block editor For your example you could modify the checking portion as follows: const { registerPlugin } = wp.plugins; … Read more

Simple text and image slider

I use jQuery Scrollable for all my slider needs. It supports sliding of any type of content, and content can slide horizontally and vertically. JQuery Tools and JQuery Scrollable are free, open sourced, and well documented. The support forums can be very useful if you are having problems implementing scrollable.

How to fix my old theme so it loads jQuery properly

Taking a stab at a general answer, since we don’t (yet?) have access to the specific Theme. Note: all of these edits can – and perhaps should – be implemented via Child Theme. First, you need to remove ALL of those lines from header.php. Scripts should be enqueued, rather than hard-coded into the template. Then, … Read more

filterable portfolio with wordpress and jquery

When enqueueing scripts in a child theme directory, use get_stylesheet_directory_uri() instead of get_template_directory_uri(). In the case of a child theme, get_template_directory_uri() will return the parent theme’s directory. function enqueue_filterable(){ wp_register_script( ‘filterable’, get_stylesheet_directory_uri() . ‘/js/filterable.js’, array( ‘jquery’ ) ); wp_enqueue_script( ‘filterable’ ); } add_action( ‘wp_enqueue_scripts’, ‘enqueue_filterable’ );

url – ajax loaded but no JS

Try this code in your complete callback of the load function: $(“.postbox_wrapper”).load( jQuery(this).attr(“href”) + ” .postbox_wrapper”, function(response, status, xhr) { // complete callback // create a empty div var div = document.createElement(‘div’); // fill div with response div.innerHTML = response; // take correct part of the response var ref = $($(div).find(‘.postbox_wrapper’).html()); // filter response for … Read more

jQuery accordion plugin won’t work once used in WP

You seem to still be having issues, what i’d do to avoid having all that code clutter the header is setup a bunch of enqueues, but handle the html5 js inside the print scripts action along with the appropriate conditional comments(there’s no proper way to do this with the enqueue system). First the HTML5 js, … Read more