go41

Re: Where to put mega tags and description in blog’s template? :: Reply by Joern

von Joern am 19. Jan. 2011 | Keine Kommentare

okay, this is the first half of arthemia header.php

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>

<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />

<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

<link rel="icon" href="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/favicon.ico" />
<link rel="shortcut icon" href="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/favicon.ico" />

<?php wp_head(); ?>

</head>
<body>

<div id="head" class="clearfloat">

there should be no blank line before …DOCTYPE html PUBLIC !
putting in new meta tags it should look like this:

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>

<meta name="keywords" content="keyword1,keyword2,keyword3,as,single,words,written,here" />
<meta name="description" content="content as sentence will be written here" />

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />

<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

<link rel="icon" href="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/favicon.ico" />
<link rel="shortcut icon" href="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/favicon.ico" />

<?php wp_head(); ?>

</head>
<body>

<div id="head" class="clearfloat">
A plugin makes it easier because it generates keywords and description depending on the title and content of your individual posts.

See:

http://wordpress.org/extend/plugins/sea … rt=popular
____________________
you find me on Google+, Twitter and Facebook

(von: Joern)

Hier noch 5 weitere Ergebnisse dieses Threads:

Where to put mega tags and description in blog’s template?

18. Jan. 2011 (von: omerkhan01)

Hi there, my site is hereI was told you need to put meta tags and description in the header.php fileSo I did thatCode:<meta name="keywords" content="their keywords will be written here" /><meta name="description" content="text">and as you can see my site was…

Re: Where to put mega tags and description in blog’s template? :: Reply by Joern

18. Jan. 2011 (von: Joern)

you should put these lines into the head /head tag which is already there.your header.php should start like this:<!DOCTYPE html PUBLIC "-//W3C//DTD X ...<html xmlns=....<head ....<meta http-equiv="....<title>....PUT YOUR META TAGS HERE (without head /head around as you are in there…

Re: Where to put mega tags and description in blog’s template? :: Reply by omerkhan01

19. Jan. 2011 (von: omerkhan01)

If I replace that part with my meta content and description my site gets pushed down and there is a big black gap between the top margin and my site. How do I make my site's top edge touch the…

Re: Where to put mega tags and description in blog’s template? :: Reply by omerkhan01

19. Jan. 2011 (von: omerkhan01)

There is no space before DOCTYPE.I did add the keywords in that spot and the space didn't increase thanks. But do you see the black space between the top of the screen and the white container. How do I move…

Re: Where to put mega tags and description in blog’s template? :: Reply by Joern

19. Jan. 2011 (von: Joern)

this position of keywords and description is better now, just one thing:in here:meta name="description" content="...the "Maaximum ..."you have to remove this one " (double quotation mark) as this is the pair of opening and closing marks for the content.this two…

Autor:

Du findest mich auch auf Google+, Twitter und Facebook!

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert.


weitere forum Beiträge: