create filter in functions.php

Whenever you see apply_filters( ‘filter_name’, $value ), you can use add_filter() to replace or modify the value of $value: add_filter( ‘filter_name’, ‘callback_function’ ); Where callback_function is a function that you create. That function will accept $value as an argument, and needs to return a new value. So for your example, that will look like this: … Read more

How to change the order of Jquery in the footer of my theme?

Understand wp_enqueue’s dependencies parameter You need to ensure the other script depends on jQuery being ready before it loads. Checking the wp_enqueue usage example: <?php wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer ); ?> It is $deps (dependencies) that we can utilise for this purpose. Properly enqueue the second script, and leverage that parameter Secondly you … Read more