I'm sure this has been brought up before but it would be good to have control of the meta description for categories.
At the moment it is the default.
![]() |
| | LinkBack | Thread Tools | Display Modes |
| ||||
| Control of meta description - categories |
| |||
| Quote:
![]() This is very detrimental to the success of good SEO. I would be willing to pay for this mod and share it with the community. I have contacted Ashdigg to see if he can develop this, but have heard nothing back from him. He's likely very busy right now. I'll pay anyone to get this working. Just send me a private message and let me know. |
| |||
| Note: This fix is for v 9.82 AND v 9.9.0 Ok, well here is a TEMPORARY SOLUTION that I worked on. It took me a while to figure out how to tweak this just right, but it does work. It ain't pretty to look at and it also takes a lot of work if you have lots of categories... but here goes: In v 9.82, look for this code in index.php: Code: if(isset($_REQUEST['category'])){
$thecat = $db->get_var("SELECT category_name FROM " . table_categories . " WHERE `category_safe_name` = '".urlencode(sanitize($_REQUEST['category'], 1))."';");
}
Code: // find the name of the current category
if(isset($_REQUEST['category'])){
$thecat = $db->get_var("SELECT category_name FROM " . table_categories . " WHERE `category_safe_name` = '".urlencode(sanitize($_REQUEST['category'], 1))."';");
$main_smarty->assign('category', $thecat);
}
Code: // find the name of the current category
if(isset($_REQUEST['category'])){
$thecat = get_cached_category_data('category_safe_name', urlencode(sanitize($_REQUEST['category'], 1)));
$thecat = $thecat->category_name;
}
Code: // find the name of the current category
if(isset($_REQUEST['category'])){
$thecat = get_cached_category_data('category_safe_name', urlencode(sanitize($_REQUEST['category'], 1)));
$thecat = $thecat->category_name;
$main_smarty->assign('category', $thecat);
}
Open your meta.tpl file and find this: Code: {if $meta_description neq ""}
<meta name="description" content="{$meta_description}" />
{else}
<meta name="description" content="Pligg Content Management System" />
{/if}
{if $meta_keywords neq ""}
<meta name="keywords" content="{$meta_keywords}, Pligg Content Management System" />
{else}
<meta name="keywords" content="Pligg Content Management System" />
{/if}
Code: {if $pagename eq "published"}
{if $category eq "Category 1"}
<meta name="description" content="My published category 1 description." />
<meta name="keywords" content="My published category 1 keywords go here" />
{elseif $category eq "Category 2"}
<meta name="description" content="My published category 2 description." />
<meta name="keywords" content="My published category 2 keywords go here" />
{elseif $category eq "Category 3"}
<meta name="description" content="My published category 3 description." />
<meta name="keywords" content="My published category 3 keywords go here" />
{elseif $category eq "Category 4"}
<meta name="description" content="My published category 4 description." />
<meta name="keywords" content="My published category 4 keywords go here" />
{else}
<meta name="description" content="My default index page (or published stories) description." />
<meta name="keywords" content="My default (index page) published content keywords go here" />
{/if}
{elseif $pagename eq "upcoming"}
{if $category eq "Category 1"}
<meta name="description" content="My upcoming category 1 description." />
<meta name="keywords" content="My upcoming category 1 keywords go here" />
{elseif $category eq "Category 2"}
<meta name="description" content="My upcoming category 2 description." />
<meta name="keywords" content="My upcoming category 2 keywords go here" />
{elseif $category eq "Category 3"}
<meta name="description" content="My upcoming category 3 description." />
<meta name="keywords" content="My upcoming category 3 keywords go here" />
{elseif $category eq "Category 4"}
<meta name="description" content="My upcoming category 4 description." />
<meta name="keywords" content="My upcoming category 4 keywords go here" />
{else}
<meta name="description" content="My default upcoming stories description." />
<meta name="keywords" content="My default upcoming stories keywords go here" />
{/if}
{elseif $pagename eq "story"}
<meta name="description" content="{$navbar_where.text2} - {$meta_description}" />
<meta name="keywords" content="{$meta_keywords}, add some extra default keywords here" />
{elseif $pagename eq "search"}
<meta name="description" content="Search Results For {$templatelite.get.search|sanitize:2|stripslashes} {$from_text} - My default search description." />
<meta name="keywords" content="{$templatelite.get.search|sanitize:2|stripslashes} {$from_text}, add some extra default keywords here" />
{elseif $pagename eq "cloud"}
<meta name="description" content="My default tag cloud description." />
<meta name="keywords" content="My default cloud keywords go here" />
{else}
<meta name="description" content="{$meta_description}" />
<meta name="keywords" content="{$meta_keywords}" />
{/if}
For Unique titles, I have done the following: open Pligg.tpl file and find: Code: <title>{if isset($pretitle)}{$pretitle}{/if}{#PLIGG_Visual_Name#}{if isset($posttitle)}{$posttitle}{/if}</title>
Code: {if $pagename eq "published"}
{if $category eq "Category 1"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Published Category 1 Title</title>
{elseif $category eq "Category 2"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Published Category 2 Title</title>
{elseif $category eq "Category 3"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Published Category 3 Title</title>
{elseif $category eq "Category 4"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Published Category 4 Title</title>
{else}
<title>{if isset($pretitle)}{$pretitle}{/if}Good Keyword Phrase Here{if isset($posttitle)} | {$navbar_where.text1} | {$navbar_where.text2}{/if}</title>
{/if}
{elseif $pagename eq "upcoming"}
{if $category eq "Category 1"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Upcoming Category 1 Title</title>
{elseif $category eq "Category 2"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Upcoming Category 2 Title</title>
{elseif $category eq "Category 3"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Upcoming Category 3 Title</title>
{elseif $category eq "Category 4"}
<title>{if isset($pretitle)}{$pretitle}{/if}My Custom Upcoming Category 4 Title</title>
{else}
<title>{if isset($pretitle)}{$pretitle}{/if}My Default Upcoming Stories Title</title>
{/if}
{elseif $pagename eq "story"}
<title>{if isset($pretitle)}{$pretitle}{/if}Different Good Keyword Phrase Here | {$navbar_where.text1} | {$navbar_where.text2}</title>
{elseif $pagename eq "search"}
<title>{if isset($pretitle)}{$pretitle}{/if}Another Good Keyword Phrase Here | Search Results For {$templatelite.get.search|sanitize:2|stripslashes} {$from_text}</title>
{elseif $pagename eq "cloud"}
<title>{if isset($pretitle)}{$pretitle}{/if}Yet Another Good Keyword Phrase Here | Most Popular Tags</title>
{else}
<title>{if isset($pretitle)}{$pretitle}{/if}{#PLIGG_Visual_Name#}{if isset($posttitle)} | {$navbar_where.text1} {/if} | {$navbar_where.text2}</title>
{/if}
You can, of course, tweak this code to suit your own needs if you're advanced enough to figure it out; but if used as above, they should be pretty darn good the way they are for good SEO. I hope this is helpful for some of you -- because for me, it was a relief to finally have SOME control over the meta data and titles for categories. ![]() Duplicate content should not occur, because essentially the home page consists of ALL POPULAR STORIES , whereas the CATEGORY PAGES contain only popular pages within that one particular category, so it will show different stories in a different order, and will be updated less frequently than the home page. Think of it like being a sorting option. But to play it safe, I would remove the sidebar modules for each of the individual published category pages and change the footer for each of the different category pages to make the layout be more UNIQUE, thereby really making it different from the home page for both search engines and humans. Last edited by blaze; 01-24-2008 at 04:27 AM.. Reason: I edited the above code to replace two {if} statements with {elseif} statements in the Title fix. |
| ||||
|
can you give the change you've made to handle this, blaze? Thanks!
__________________ Senserely Yours, James ![]() Earn more DAILY in your AdSense account - Free (good) Music Video Downloads - Sexy Robots Videos |
| |||
| Quote:
Got it? |
| ||||
|
Thanks, I got it. I thought you said you made the change to the code above, but on your site, not on the actual post.. It's very useful to be able to laser-target the categories pages with description and keywords tags. At least the most important ones.
__________________ Senserely Yours, James ![]() Earn more DAILY in your AdSense account - Free (good) Music Video Downloads - Sexy Robots Videos |
| |||
| Quote:
|
| |||
|
Hmm, this is weird... not working for me. Any change I make to meta.tpl screws my site and displays a white page for every link I go to. Any ideas? I will provide any info if you wish to provide a little support. |
| |||
| Quote:
Fighting duplicate content is number one on our list. I'm sure wishing that this had been solved way back before we created 75+ categories/subs and got indexed by G. It appears I have a lot of work to do. G reports 439 duplicate page titles out of 4400...argh...10% Any ideas on how to 301 redirect my_story_title to my-story-title for over 3500 submissions?!? I followed your blog for that fix, although it doesn't work for me yet it is an imperative move before you have thousands of submissions online :-)Just kidding with the idea thing, very tall order that ma not possibly be remedied with such a large site but invaluable knowledge when it comes to launching others. |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Meta Tagging Categories Properly? | Andromedan | Modification Tutorials | 1 | 04-04-2008 03:46 PM |
| Set Character Limit for Meta Description Tags? | blaze | General Help | 0 | 12-23-2007 05:29 PM |
| Meta Description Problems | HelloKitty | General Help | 0 | 10-17-2007 08:34 AM |
| Setting default meta description | Biomech | General Help | 9 | 10-03-2007 01:08 PM |
| Dynamic meta description tag generation fix | creep | Bug Report | 2 | 03-17-2007 10:32 AM |








I followed your blog for that fix, although it doesn't work for me yet it is an imperative move before you have thousands of submissions online :-)
Linear Mode

