Author Topic: How to change description and keywords META TAG in header  (Read 30530 times)

0 Members and 1 Guest are viewing this topic.

Offline Anarchology

  • Jr. Member
  • **
  • Posts: 60
  • I LULZ too much!
    • View Profile
    • Tainted Pix
Re: How to change description and keywords META TAG in header
« Reply #15 on: January 29, 2009, 04:59:52 AM »
Hey guys,

I have a quick question for you. I'm having just a little bit of an issue with this MOD. It isn't anything major, but wondering how this is happening and what I can do to prevent it. When viewing my main page, my site name is shown (what I want), but it is followed by the last category where an image was uploaded to. Oddly, this even happens when that certain category is hidden to guests.

Basically, it isn't the best thing for my site to have be called "My Site - XXX Pix" if you catch my drift.  :?

How can I modify the code so that when viewing my main page (home page) that ONLY my site's name is shown?

Thanks in advance!
A personal THANK YOU to all of the great programmers on this site for helping me get my site from something basic to what it is today!

My site: http://taintedpix.com
(warning: some adult content)

Offline spookypld

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: How to change description and keywords META TAG in header
« Reply #16 on: February 04, 2009, 11:55:26 AM »
For Details page You need only to paste in header.html this code:

Quote
<meta name="description" content="{image_description}">


Problem is that with allowed meta-tags in image description it copies HTML takgs f.e.
Quote
<br />
and it doesn't work for the rest of the page.

Offline relu

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • Pulsarmedia
Re: How to change description and keywords META TAG in header
« Reply #17 on: February 14, 2009, 02:17:27 AM »
in includes/functions.php find:
Code: [Select]
    "image_keywords" => $keywords,
Insert below:
Code: [Select]
    "image_keywords2" => str_replace(" ", ",", $image_row['image_keywords']),

This is verry useful for meta tag keywords.  Also i have in mind to add a new field for tag description in acp next to image name description and keywords. After to add it in meta tag keywords. Is almost the same thing but i think is usefull for a good seo. For Category is also will be a good thing to can add some keywords for  category pages. You thing is complicated?

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: How to change description and keywords META TAG in header
« Reply #18 on: May 17, 2009, 09:27:13 PM »
in includes/functions.php find:
Code: [Select]
    "image_keywords" => $keywords,
Insert below:
Code: [Select]
    "image_keywords2" => str_replace(" ", ",", $image_row['image_keywords']),

Are you saying instead of doing the steps that he mentioned in the beginning of this thread, instead just add the code you mentioned here and that is all you need to do?
As long as I can finish my site before I die.

Offline webpit

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: How to change description and keywords META TAG in header
« Reply #19 on: November 07, 2011, 02:54:50 AM »
... just for your info...
pls be aware of using html code at description..
when you use
<meta name="description" content="{image_description}."> at header .. so better avoid using (") tag.. otherwise, it will be some messy-word displayed at the top of your page ..  :)
.. you can use (') tag.. for example if you put external link <a href='http:// .... '></a>
or if you already have (") tag in all your description.. you can change at the header vise versa..:
<meta name="description" content='{image_description}.'>

hopefully useful .. :)

rgds,
if you interesting in Indonesia wayang .. you can visit my site http://galeri.wayang.pitoyo.com
« Last Edit: November 07, 2011, 06:06:16 AM by V@no »