Docs    Facebook    Documentation

Dequeuing the plugin files

To dequeue the files for each of the plugins, add the following to your plugin’s functions.php file. Make sure they’re placed within PHP tags: <?php ..script here.. ?>

// Custom Facebook Feed:
add_action( 'wp_enqueue_scripts', 'cff_remove_resources', 20 );
function cff_remove_resources() {	
	wp_dequeue_style('cff');
	wp_dequeue_script('cffscripts');
}
// Instagram Feed:
add_action( 'wp_enqueue_scripts', 'sbi_remove_resources', 20 );
function sbi_remove_resources() {	
	wp_dequeue_style('sbi_styles');
	wp_deregister_script('sbi_scripts');
	wp_dequeue_script('sbi_scripts');
}
// Custom Twitter Feeds:
add_action( 'wp_enqueue_scripts', 'ctf_remove_resources', 20 );
function ctf_remove_resources() {	
	wp_dequeue_style('ctf_styles');
	wp_dequeue_script('ctf_scripts');
}

// Feeds for YouTube:
add_action( 'wp_enqueue_scripts', 'sby_remove_resources', 20 );
function sby_remove_resources() { 
wp_dequeue_style('sby_styles');
wp_dequeue_script('sby_scripts');
}
// Social Wall:
add_action( 'wp_enqueue_scripts', 'sbsw_remove_resources', 20 );
function sbsw_remove_resources() {	
	wp_dequeue_style('sbsw_styles');
	wp_dequeue_script('sbsw_scripts');
}

To include the plugin files on specific page you’d then need to manually add the links to those CSS and JavaScript files on each page you are displaying the associated feed. For example, to include the Custom Facebook Feed files:

CSS:
<link rel='stylesheet' id='cff-css' href='//yourwebsite.com/wp-content/plugins/custom-facebook-feed-pro/css/cff-style.css' type='text/css' media='all' />

JavaScript:
<script src="//yourwebsite.com/wp-content/plugins/custom-facebook-feed-pro/js/cff-scripts.js" type="text/javascript">

support

Couldn’t find your answer in the docs?

Contact Support

Was this article helpful?