Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Installing Meta Tags

Quote Reply
Installing Meta Tags
What's is the quickest way to install meta tags into each forum category? Which template would I edit to execute this function (installing meta tags.)

SEO Consultation
Economics & Personal Finances
Quote Reply
Re: [discusswireless] Installing Meta Tags In reply to
First thing you want to do is add fields to your category table, so from your main admin page, Tools, then click on Category on the left. Add text fields for each meta tag you want to add. You can then add the data to each category via Forums at the top of your admin pages.

Then edit category_view.html to add in the tags, something like:

<%if cat_description%>
<meta name="description" content="<%cat_description%>">
<%endif%>

You could do something similar for individual forums as well, in which case you'd want to add the fields to the forum table and modify forum_view.html
Quote Reply
Re: [agaffin] Installing Meta Tags In reply to
Is there a method to install unique meta tags to each forum without doing each forum individually?

SEO Consultation
Economics & Personal Finances
Quote Reply
Re: [discusswireless] Installing Meta Tags In reply to
Actually forget about that question....is this code

<%if cat_description%>
<meta name="description" content="<%cat_description%>">
<%endif%>

precisely what I'd use?

SEO Consultation
Economics & Personal Finances
Quote Reply
Re: [discusswireless] Installing Meta Tags In reply to
The code I posted assumes you've created a field in your category table called cat_description.

But you could call the field anything you want - just remember to change the references to it in the code to the name you use.
Quote Reply
Re: [agaffin] Installing Meta Tags In reply to
Ok I've added two 'colums' name cat_description and cat_keywords..... now i'm lost what to do next. I want to install meta tags unique to each page...

SEO Consultation
Economics & Personal Finances
Quote Reply
Re: [discusswireless] Installing Meta Tags In reply to
OK, in looking at the code for my site, I see it's a bit more, um, interesting than I'd remembered, but here goes:

In your admin panel, click on Forums at the top of the page.

Then, on the left, click on List All. You'll get a list of all your categories and forums. Click on Modify next to the category you want to add the meta tags to. You'll get a form, at the bottom of which you should see blank text boxes for those new fields you've created. Add in your description and keywords. Click on Modify Record at the bottom, then repeat this process for each category for which you want to add that meta information.

When done, edit your category_list.html template (I think I wrote category_view.html before, sorry about that!). Somewhere between

Code:
<head> and </head>

insert something like the following:

Code:
<%ifnot main_page%>
<%loop everything%>
<%if cat_description%><meta name="description" content="<%cat_description%>" />
<%endif%>
<%if cat_keywords%><meta name="keywords" content="<%cat_keywords%>" />
<%endif%>
<%lastloop%><%endloop%>
<%endif%>

For some reason, you need those loop statements for categories but not for forums. My apologies for not remembering that - this is why I should leave stuff like this to the trained professionals :-).
Quote Reply
Re: [agaffin] Installing Meta Tags In reply to
In the beginning you mentioned create fields starting by going to 'tools, categories' and adding them. I did this, and instead the categories showed up on the acutaly forum..... So i used added the fields in the 'forum category' and no t the 'category category' . I did and it does appear to be working except it's not coming up in the source code. Is it imperative that the field are created in the 'category' choice like you initially said?

SEO Consultation
Economics & Personal Finances
Quote Reply
Re: [discusswireless] Installing Meta Tags In reply to
i figured it out.

you have to create new fields in the fourm properties.

you also insert that code in the forum view and not category list.

SEO Consultation
Economics & Personal Finances