Support » Fixing WordPress » Inserting code after

  • Hi:

    I need to install a piece of code after <body> (webfonts)

    I’ve been exploring a lot and can’t find the <body> tag any where.

    Directions in a very basic WP newbie user language, will be highly appreciated.


Viewing 9 replies - 1 through 9 (of 9 total)
  • Can you provide more info? Link to the code or plugin you are trying to install.

    it should be in your theme’s header.php

    Thanks Patyuen: requires me to do this:

    Copy the code below and paste it into your website’s HTML after the opening <body> tag.

    The code only needs to be pasted once. Subsequent changes to your style sheet will automatically be reflected on your Web page without modifying the code.

    The code is:

    `<script type=”text/javascript” src=””></script>

    Thanks Samboll.

    I have gone to Appearance >> Editor >> Header, but I can’t find the < body > tag any where there.

    I also checked all the files on the right column: footer, main index template, page template… and there’s no < body> there either.


    By the way, I am using WP 3.0 and TwentyTen theme.

    here is the 1st part of twenty-ten header.php

     * The Header for our theme.
     * Displays all of the <head> section and everything up till <div id="main">
     * @package WordPress
     * @subpackage Twenty_Ten
     * @since Twenty Ten 1.0
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    	 * Print the <title> tag based on what is being viewed.
    	 * We filter the output of wp_title() a bit -- see
    	 * twentyten_filter_wp_title() in functions.php.
    	wp_title( '|', true, 'right' );
    <link rel="profile" href="" />
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    	/* We add some JavaScript to pages with the comment form
    	 * to support sites with threaded comments (when in use).
    	if ( is_singular() && get_option( 'thread_comments' ) )
    		wp_enqueue_script( 'comment-reply' );
    	/* Always have wp_head() just before the closing </head>
    	 * tag of your theme, or you will break many plugins, which
    	 * generally use this hook to add elements to <head> such
    	 * as styles, scripts, and meta tags.
    <body <?php body_class(); ?>>

    last line is <body> tag

    It sounds like that script is for html sites and not WP sites.

    Take a look at Google Webfont. It may do what you want and there is a WP plugin for it.

    Thanks Samboll:

    I just inserted the code there and it worked!

    Thanks Patyuen:

    I’ll give it a try.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Inserting code after’ is closed to new replies.