Use dedicated functions

You’ll want to enqueue the script in your functions.php (If this is in a plugin, you could do a little differently). Here’s a sample: function owl_scripts() { wp_enqueue_script( ‘owl-carousel’, get_stylesheet_directory_uri() . ‘js/carousel.js’, array( ‘jquery’ ), ”, true ); wp_enqueue_style( ‘owl-style-min’, get_stylesheet_directory_uri() . ‘css/carousel.css’ ); } add_action( ‘wp_enqueue_scripts’, ‘owl_scripts’ ); This is assuming: You’re using a … Read more

Query pages created by deleted users

WordPress gives you a few options on the Dashboard when you delete a user. As far as I am aware the options are: Delete the user but keep their name / credit on created content Delete the user and attribute their content to another user Delete the user AND delete their content Unless there were … Read more

Why are my wp_query args being ignored if post_type = CPT

I found the problem, thanks to @vancoder for the tip! I have pre_get_posts attached to a function for alphabetizing product posts, which was causing everything else to be out of whack. It should have been targeting only products! /*************************************************************** * Change Archive sorting * https://codex.wordpress.org/Alphabetizing_Posts ***************************************************************/ function course_dir_sort_order( $query ) { if ( $query->is_archive(‘products’) ) … Read more