Inserting code after (10 posts)

  1. R033y
    Posted 5 years ago #


    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.


  2. patyuen
    Posted 5 years ago #

    Can you provide more info? Link to the code or plugin you are trying to install.

  3. Samuel B
    Posted 5 years ago #

    it should be in your theme's header.php

  4. R033y
    Posted 5 years ago #

    Thanks Patyuen:
    Webfonts.com 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="http://fast.fonts.com/jsapi/f710f664-a77c-4817-a71f-5e8684c28ff1.js"></script>

  5. R033y
    Posted 5 years ago #

    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.


  6. R033y
    Posted 5 years ago #

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

  7. Samuel B
    Posted 5 years ago #

    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="http://gmpg.org/xfn/11" />
    <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

  8. patyuen
    Posted 5 years ago #

    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.


  9. R033y
    Posted 5 years ago #

    Thanks Samboll:

    I just inserted the code there and it worked!

  10. R033y
    Posted 5 years ago #

    Thanks Patyuen:

    I'll give it a try.

Topic Closed

This topic has been closed to new replies.

About this Topic