Calling JavaScript for specific page irrespective of whichever theme you select

See wp_enqueue_script() for the information how to add scripts without editing the HTML. I assume the script is already registered or you’ll add all necessary parameters. Tied to the particular page ID: if( is_page($page_id) ) { // provide the page ID wp_enqueue_script(‘YOUR_SCRIPT_NAME’); //enqueue the script on success } Tied to the page slug: $slug = … Read more

“Warning: count()” printing in Page templates

Turns out the problem was Jetpack. I looked through the <head> to see where in the stack it was breaking and it was right in the middle of the Jetpack plugin code. Looks like it’s being worked on here: https://github.com/Automattic/jetpack/issues/8156 under “PHP warnings.” Since Jetpack isn’t necessary for my dev server on this project, I … Read more

How do I override WordPress plugin css [closed]

Assuming you are overriding the Page Builder styles with vc-style stylesheet. Try this.. function vc_override() { wp_enqueue_style( ‘vc-style’, get_stylesheet_directory_uri() . ‘/css/vc_elements-style.css’, array(‘js_composer_front’) ); //visual composer } add_action( ‘wp_enqueue_scripts’, ‘vc_override’, 999 ); View your site’s source to check whether your style is appearing before or after visual composer style.