How can I disable ajax content loading for the Post Grid VC Shortcode?
I don't want the loading dots to show.
Thanks
How can I disable ajax content loading for the Post Grid VC Shortcode?
I don't want the loading dots to show.
Thanks
In Post Grid Visual Composer Shortcode If you use display style as "pagination" then you have to set Pagination style from here: Pagination > Pagination style ( Select "None" ). it will remove dots for pagination and there will be no ajax data for posts and no pagination. see attached image for more information.
Your question is "I don't want the loading dots to show", you simply do with add custom css
.vc_grid-loading {display: none;}
You can add custom css via click on top right gear icon of visual composer (see below image)
Look in the plugin and find the name of the script that handles the AJAX and dequeue it.
/**
* Dequeue a JS script.
*
* Hooked to the wp_print_scripts action, with a late priority (100),
* so that it is after the script was enqueued.
*/
function wpdocs_dequeue_script() {
wp_dequeue_script( 'script-name' );
}
add_action( 'wp_print_scripts', 'wpdocs_dequeue_script', 100 );
You could enclose the shortcode with a second shortcode that strips out the selectors that triggers the AJAX. See: enclosing shortcodes
[new-shortcode][original-shortcode][/new-shortcode]
function new_shortcode($atts = [], $content = null) {
// do something to $content
// run shortcode parser recursively
$content = do_shortcode($content);
// always return
return $content;
}
add_shortcode('new-shortcode', 'new_shortcode');