• Hello,
    Can someone give me the run down as to where I can add the meta tags for:
    Title
    Description
    Keywords
    Author
    etc… Be specific.. I cannot seem to find it.. Maybe I have just seen so many pages in the last few days I am going blind..
    Kind regards,
    Gravity..
    PS.. if there is any certain specific code, please let me know.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter gravity

    (@gravity)

    Can it just go right inside the <head></head> tags on the index page along with the other 2? Normally?

    yes. AFAIK anywhere between <head> and </head> is OK.

    For an easy description tag, automatically tailored to each post — open your index.php template and add this after your title and robots meta tags:


    <meta name="description" content="<?php echo htmlentities(get_the_excerpt()); ?>" />

    This will take the WordPress pre-generated excerpt for you posts, convert the appropriate characters to html, and spit out your excerpt as a description meta tag!
    Note: Even if you don’t add your own excerpts, WordPress automatically makes one for you based on the first part of your post.

    That description tag works great. Thanks for posting the code!

    How do you make the title of the post, auto insert into the title tag? Maybe this is standard in the index template, but maybe I screwed that up with all the tinkering. ??

    I figured it out… here’s the code for the title tag:

    <title><?php bloginfo(‘name’); ?> <?php wp_title(); ?></title>

    This works great when looking at pages for individual posts, but when the blog index page is brought up on its own it seems to pick a random post to get the excerpt.

    Is there an elegant way to check to see if you are in an individual post or on the index page? That way, for the meta description, you can use your blog description for the index page and the post’s excerpt for an individual post.

    I am having the same problem as snowfall. Anyone know of a hack that does this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘addition of Title / Description / Meta?’ is closed to new replies.