Title: function remove css javascript jetpack related posts
Last modified: February 1, 2025

---

# function remove css javascript jetpack related posts

 *  Resolved [Guillermo](https://wordpress.org/support/users/guillermo77/)
 * (@guillermo77)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/function-remove-css-javascript-jetpack-related-posts/)
 * I only use related posts and load the file:
   related-posts/related-posts.min.js?
   ver=20240116(I think I dont need explode the css) and this script not work:
 *     ```wp-block-code
       function deregister_plugin_styles() {// Remove el estilo de Related Posts de Jetpackwp_deregister_style( 'jetpack_related-posts' );}add_action( 'wp_print_styles', 'deregister_plugin_styles', 1 );function deregister_plugin_script() {// Remove el script de Related Posts de Jetpackwp_deregister_script('jetpack_related-posts');}add_action('wp_print_scripts', 'deregister_plugin_script');
       ```
   
 * And this cript not work, the plugin url is wrong and the version is empty ver
   =
 *     ```wp-block-code
       function insert_related_posts_assets($content) {// Solo cargar en entradas o páginas únicasif (is_single() || is_page()) {// Obtener las URLs de los archivos JS y CSS de Jetpack Related Posts$js_url = plugins_url('related-posts/js/related-posts.js', FILE);$css_url = plugins_url('related-posts/css/related-posts.css', FILE);// Obtener la fecha de la última modificación de los archivos$js_version = filemtime(plugin_dir_path(FILE) . 'related-posts/js/related-posts.js');$css_version = filemtime(plugin_dir_path(FILE) . 'related-posts/css/related-posts.css');// Crear los enlaces de los archivos JS y CSS con la versión incluida$js_tag = '';$css_tag = '';// Agregar los enlaces justo después del contenido$content .= $css_tag . "\n" . $js_tag;}return $content;}add_filter('the_content', 'insert_related_posts_assets');
       ```
   
 * If can help me at least with the first code, thanks

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * (@erania-pinnera)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/function-remove-css-javascript-jetpack-related-posts/#post-18283577)
 * Hi there, [@guillermo77](https://wordpress.org/support/users/guillermo77/),
 * If I get this right, it looks like you want to stop Jetpack Related Posts from
   loading certain files, which requires custom code.
 * This goes beyond [our scope of support](https://jetpack.com/support/scope-of-support/),
   so we cannot help you do this, I’m afraid.
 *  Thread Starter [Guillermo](https://wordpress.org/support/users/guillermo77/)
 * (@guillermo77)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/function-remove-css-javascript-jetpack-related-posts/#post-18283644)
 * I solve my problem, just meed put dynamic the version ver=
 * Thank you!
 *  Plugin Contributor [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * (@erania-pinnera)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/function-remove-css-javascript-jetpack-related-posts/#post-18283785)
 * Hey [@guillermo77](https://wordpress.org/support/users/guillermo77/),
 * We’re to happy to hear that! ⭐
 * I’m going to mark this thread as solved. If you have any further questions or
   need more help, you’re welcome to open another thread here. Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘function remove css javascript jetpack related posts’ is closed to new
replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/function-remove-css-javascript-jetpack-related-posts/#post-18283785)
 * Status: resolved