Adding meta tags to <head>

Having trouble installing serendipity?
Post Reply
stoub
Regular
Posts: 7
Joined: Mon Oct 18, 2004 4:57 pm

Adding meta tags to <head>

Post by stoub »

Hi,

I would like to add meta tags to the <head> section of my weblog, is there a way to do that easily, maybe with a plugin?

I tried messing with layout.php but all I get is a page with no stylesheet, and no sidebars :-(

Thanks for your help
tadpole
Regular
Posts: 88
Joined: Fri Oct 08, 2004 6:20 am
Location: 33°6'4.079" North, 117°3'6.563" West
Contact:

Post by tadpole »

The proper place to add them would be serendipity_genpage.inc.php, or you could always make Serendipity embedded.

What meta tag are you trying to add? Would it be useful to add to the main distribution, or is specific to you?
stoub
Regular
Posts: 7
Joined: Mon Oct 18, 2004 4:57 pm

Post by stoub »

Well I would like to add some meta tags like "keywords", "description", "revisit-after", etc, to help having a better ranking in the search engines.

A nice feature would be a plugin or somewhere in the configuration where we could add custom meta tags in the header without changing the php code.
jhermanns
Site Admin
Posts: 378
Joined: Tue Apr 01, 2003 11:28 pm
Location: Berlin, Germany
Contact:

Post by jhermanns »

i made a plugin for myself that does that... can you wait for 0.8 or do you want to have it right away?
stoub
Regular
Posts: 7
Joined: Mon Oct 18, 2004 4:57 pm

Post by stoub »

Well it would be very nice of you if you could send it to me, until the next release is available :-)

Thanks :) (I send my private email adresse to you in private message)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

The very easiest way for you to do it (Without a plugin) is to enter Serendipity Configuration and turn on embedded mode.

Then open your templates/layout.php in the template you created (or use templats/default/layout.php if that file does not exist in your directory).

Then also open the file serendipty_genpage.inc.php - there you'll see all the HTML headers. You can copy them (with the PHP-Variables) and insert them in your layout.php file.

Your layout.php needs to contain html, head and body tags, and body+html need to be closed at the bottom of layout.php...
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
jhermanns
Site Admin
Posts: 378
Joined: Tue Apr 01, 2003 11:28 pm
Location: Berlin, Germany
Contact:

Post by jhermanns »

E. Bess
Regular
Posts: 12
Joined: Mon Dec 20, 2004 10:41 pm
Location: Brooklyn, NY

Post by E. Bess »

Just found this. Downloaded the plugin, and found it to be incredibly handy. Worked like a charm. Thanks so much.
Tom - Daai Tou Laam
Regular
Posts: 15
Joined: Thu Jan 06, 2005 1:34 am
Location: Hong Kong
Contact:

Post by Tom - Daai Tou Laam »

I've noticed Dublin Core tags for individual entries. How about Dublin Core for the main page in the head section drawing from latest update, page title, owner, home directory that are found on the 7.1 info page?
smartcard
Regular
Posts: 14
Joined: Sat Jan 08, 2005 12:47 pm

Post by smartcard »

I downloaded this http://www.jannis.to/daily/archives/552 ... -head.html

Need help how to apply it to my blog
Post Reply