Home › Forums › CSS › Flip box and autoplay › Reply To: Flip box and autoplay
@gindel86 Amitai, It seems to me that for any functionality or feature of this website a WordPress plugin is used to solve the issue at hand. There are a few problems with this approach.
Firstly because a lot of WP-plugins means a lot of inserted javascript files, and the problem with this is mainly performance, which has to do with the extreme high number of so called http-requests, which will make a website slower to load on empty cache.
And secondly “not seeing the trees from the forest”, there is a lot going on, almost impossible to have oversight. And maybe this high level of abstraction which comes with using short-codes also adds up in making things harder to debug.
but it’s not something that I control
This is the problem …
For this flip-card effect, why not look at a demo that does just that, no need to use a plugin. Insert your javascript either within your functions.php
with [enqueue script](https://developer.wordpress.org/reference/functions/wp_enqueue_script/)
, or maybe even inline in footer.php
; take some control back: be in the driving seat yourself.
/**
* Proper way to enqueue scripts and styles.
*/
function my_theme_name() {
wp_enqueue_style( 'style-name', get_stylesheet_uri() );
wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/example.js', array(), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'my_theme_name' );