Skip to content

Instantly share code, notes, and snippets.

@schalkburger
Created February 17, 2015 08:23
Show Gist options
  • Save schalkburger/9ec0103f698d12ca167f to your computer and use it in GitHub Desktop.
Save schalkburger/9ec0103f698d12ca167f to your computer and use it in GitHub Desktop.
Contact Form 7 custom loading image
<?php
// Custom loading image
add_filter('wpcf7_ajax_loader', 'my_wpcf7_ajax_loader');
function my_wpcf7_ajax_loader () {
return get_bloginfo('stylesheet_directory') . '/img/ajax-loader.gif';
}
?>
@morgyface
Copy link

Looks like they've restructured how it works, the loader is now the background of a span so it can be customised just using css. This kind of thing:

div.wpcf7 form.wpcf7-form span.ajax-loader {width: 32px; height: 32px; background-image:url(../images/custom-ajax-loader.gif); background-size: 32px}

@Kovalchik8
Copy link

This is a workaround https://wordpress.org/plugins/cf7-better-ui/
Tiny plugin with modern loaders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment