• Hi, I have a strange error with a site I’m working on – https://www.picturethis.ca/.

    Recently, the numbers 1111 appeared in the HEAD of the site and it’s not even in a html tag.

    If I remove wp_head(); the numbers disappear, but wp_head(); is of course essential.

    There are JS errors relating to Vimeo, but the videos all play fine.

    There are no errors in the server log files.

    Might be obvious but can’t work this one out. Any help much appreciated. Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter kmelv85

    (@kmelv85)

    Forgot to mention that I’ve already tried disabling all plugins but the code was still present in the head. Also tried updating WP to the latest version, although I have since rolled back so it’s compatible with the translate plugin I’m using.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Try the string locator to look in your source files for ‘1111’.

    https://www.ads-software.com/plugins/string-locator/

    Thread Starter kmelv85

    (@kmelv85)

    Thanks for the idea – I tried installing the plugin and searching all the files but it returned no matches.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    OK, so much for the easy way.

    This may be a plugin or theme conflict. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

    Thread Starter kmelv85

    (@kmelv85)

    Ok I’ve managed to narrow it down to a bizarre problem with the stylesheets which are loaded from my themes functions.php file. If I remove one of the links to the stylesheets, one of the numbers disappears.

    Here is the code below:

    /*-----------------------------------------------------------------------------------*/
    /* Register Core Stylesheets
    /* These are necessary for the theme to function as intended
    /* Supports the 'Better WordPress Minify' plugin to properly minimize styleshsets into one.
    /* https://www.ads-software.com/extend/plugins/bwp-minify/
    /*-----------------------------------------------------------------------------------*/
    
    if ( !function_exists( 'st_registerstyles' ) ) {
    
    function st_registerstyles() {
    
    	// Set a dynamic version for cache busting
    	$theme = wp_get_theme();
    	if(is_child_theme()) {
    		$parent = $theme->parent();
    		$version = $parent['Version'];
    		} else {
    		$version = $theme['Version'];
    	}
    
    	$stylesheets = '';
    
    	// register the various widths based on max_layout_width option
    	$maxwidth = of_get_option('max_layout_width');
    
    	if ($maxwidth) {
    		// load the appropriate stylesheet
      		$stylesheets .= wp_register_style('skeleton', get_bloginfo('template_directory').'/css/skeleton-'.$maxwidth.'.css', array(), $version, 'screen, projection');
    	} else {
    		//fallback to original for legacy theme compatibility
      		$stylesheets .= wp_register_style('skeleton', get_bloginfo('template_directory').'/css/skeleton-960.css', array(), $version, 'screen, projection');
    	}
    
    	// Register all other applicable stylesheets
        $stylesheets .= wp_register_style('layout', get_bloginfo('template_directory').'/css/layout.css', array(), $version, 'screen, projection');
        $stylesheets .= wp_register_style('formalize', get_bloginfo('template_directory').'/css/formalize.css', array(), $version, 'screen, projection');
        $stylesheets .= wp_register_style('theme', get_bloginfo('stylesheet_directory').'/style.css', array(), $version, 'screen, projection');
    
    	// hook to add additional stylesheets from a child theme
    	echo apply_filters ('child_add_stylesheets',$stylesheets);
    
    	// enqueue registered styles
    	wp_enqueue_style( 'skeleton');
    	wp_enqueue_style( 'theme');
    	wp_enqueue_style( 'layout');
    	wp_enqueue_style( 'formalize');
    }
    
    add_action( 'wp_enqueue_scripts', 'st_registerstyles');
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘1111 code in head, visible on site’ is closed to new replies.