Help me out please guys

Posted in: Newsmag
Post count: 18

I’ve been searching for the last 3 days for a way to remove the query strings from static resources.

I’ve read virtually the whole of the forums for the Newsmag and Newspaper themes, I’ve tried various different plugins, I’ve added code to the functions php and still no joy

The plugins didn’t seem to have any effect and the code added to the functions php broke my test site.

I’m getting a performance score of 8/100 on pingdom for Remove query strings from static resources and would obviously like to improve this.

I have bought and paid for 4 instances of the theme for 4 new sites that we are developing, they are all on brand new, clean shared hosting in separate A2 hosting accounts and all on new, clean wordpress installs, all run the same plugins and all have exactly the same settings, the only difference is they run different stacks. They all seem to behave differently to the same configurations, some changes break one site but not another? It’s all very confusing.

Many thanks

Dean

Post count: 18

All 4 sites only have the basic demo content loaded

Post count: 18

Don’t worry about it, I’ve now managed to get the matter figured out

Post count: 9544

I have some custom code I use in functions.php — some of which you may find useful for optimization:
——————

/*CHRISTOPHER's CUSTOM MODS - 1.10.15 rev15A - (c) 2010-2015 Chris Simmons */

remove_action( 'wp_head', 'wp_generator' ) ;
remove_action( 'wp_head', 'wlwmanifest_link' ) ;
remove_action( 'wp_head', 'rsd_link' ) ;
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'feed_links_extra', 3 );

add_filter( 'pre_comment_content', 'wp_specialchars' );

function no_errors_please(){
return 'You appear to be up to no good. Please stop now!';
}
add_filter( 'login_errors', 'no_errors_please' );

/* Disable YOAST SEO Admin Bar. */
function mytheme_admin_bar_render() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wpseo-menu');
}
// and we hook our function via
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );

function delete_enclosure(){
return '';
}
add_filter( 'get_enclosed', 'delete_enclosure' );
add_filter( 'rss_enclosure', 'delete_enclosure' );
add_filter( 'atom_enclosure', 'delete_enclosure' );

function remove_cssjs_ver( $src ) {
if( strpos( $src, '?ver=' ) )
$src = remove_query_arg( 'ver', $src );
return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );

add_filter( 'jpeg_quality', create_function( '', 'return 50;' ) );

function remove_pingback_url( $output, $show ) {
if ( $show == 'pingback_url' ) $output = '';
return $output;
}
add_filter( 'bloginfo_url', 'remove_pingback_url', 10, 2 );

add_action('init', 'myoverride', 100);
function myoverride() {
remove_action('wp_head', array(visual_composer(), 'addMetaData'));
}

function dequeue_visual_composer_css() {
if (is_single()) {
wp_dequeue_style('js_composer_front');
}
}
add_action('wp_enqueue_scripts', 'dequeue_visual_composer_css', 1003);

Post count: 9544

(the last item there removes visual composer css from post pages, where MOST folks don’t use VC; I don’t — remove that if you do)

See my other post on “mod_pagespeed” today for explanation of what some of that does. 🙂

Post count: 7909

@Chris thanks!


@deanhankin
Glad you managed to solve that! Let me know if you have others issuess related to the theme.

Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newsmag’ is closed to new topics and replies.