- Posts: 92
COMMUNITY FORUM
Category Page Meta Description and Keywords
- Red Evolution
-
Topic Author
- Offline
- Premium Member
Just getting to grips with K2 and evaluating it for use in a large site. I created a category and linked to it but can't seem to add meta data for this page. The category itself doesn't have meta data input boxes and the menu link parameters don't allow them to be created either.
Am I missing something?
cheers
d
Please Log in or Create an account to join the conversation.
- vtiger
-
- Offline
- Premium Member
- Posts: 83
But this can be solved with sh404sef or
Is also possible add some code to the head of your category.php template which grab "category description" and put them to metatitle and Item title to metakeywords. Better than nothing ;)
// no direct access
defined('_JEXEC') or die('Restricted access');
/* Add AtLeast AutoMetadata - Hack */
$mainframe->prependMetaTag( "keywords", substr(strip_tags($this->category->name ), 0, 255) );
$mainframe->prependMetaTag( "description", substr(strip_tags($this->category->description ), 0, 255) );
Regards,
l
Please Log in or Create an account to join the conversation.
- Andrew Holden
-
- Offline
- New Member
- Posts: 15
Is also possible add some code to the head of your category.php template which grab "category description" and put them to metatitle and Item title to metakeywords. Better than nothing ;)
// no direct access
defined('_JEXEC') or die('Restricted access');
/* Add AtLeast AutoMetadata - Hack */
$mainframe->prependMetaTag( "keywords", substr(strip_tags($this->category->name ), 0, 255) );
$mainframe->prependMetaTag( "description", substr(strip_tags($this->category->description ), 0, 255) );
Regards,
l
Thanks - that sounds like a great idea.
However, I'm not sure which category.php to modify. I've got an override for catgory.php in my normal HTML folder, but it doesn't seem to be accomplishing my goal - (since I've removed the default category description in the override).
Any suggestions on adding a meta description *without* using the string you mention above? I only have one blog-page on my site, so I could add the data directly, but I'm not sure how...
The strange thing is that Google et al. is only seeing the most recently indexed post as our meta - not sure why.
Please Log in or Create an account to join the conversation.
- Krasimir Nikolov
-
- Offline
- New Member
- Posts: 6
Lukas said:// no direct access
defined('_JEXEC') or die('Restricted access');
/* Add AtLeast AutoMetadata - Hack */
$mainframe->prependMetaTag( "keywords", substr(strip_tags($this->category->name ), 0, 255) );
$mainframe->prependMetaTag( "description", substr(strip_tags($this->category->description ), 0, 255) );
Regards,
l
Please Log in or Create an account to join the conversation.
- John mcelborough
-
- Offline
- New Member
- Posts: 10
Lukas said:// no direct access defined('_JEXEC') or die('Restricted access');
/* Add AtLeast AutoMetadata - Hack */
$mainframe->prependMetaTag( "keywords", substr(strip_tags($this->category->name ), 0, 255) );
$mainframe->prependMetaTag( "description", substr(strip_tags($this->category->description ), 0, 255) );
Regards,
l
I'd second this- exactly hat I was looking for thanks.
Please Log in or Create an account to join the conversation.
- vtiger
-
- Offline
- Premium Member
- Posts: 83
Thanks
l
Please Log in or Create an account to join the conversation.
- emre
-
- Offline
- New Member
- Posts: 1
addALTER TABLE `jos_k2_categories` ADD `metadesc` text NOT NUL
>
ALTER TABLE `jos_k2_categories` ADD `metakey` text NOT NUL
>
Please Log in or Create an account to join the conversation.
- vtiger
-
- Offline
- Premium Member
- Posts: 83
Hope that Lefteris is going implement this...
l
Please Log in or Create an account to join the conversation.
- Ben Chesters
-
- Offline
- New Member
- Posts: 16
emre said:
ı made manuel metas. I modifeid some page and db. And İt worked.----DB CHANGE/UPDATE
addALTER TABLE `jos_k2_categories` ADD `metadesc` text NOT NUL
>
ALTER TABLE `jos_k2_categories` ADD `metakey` text NOT NUL
>
Please Log in or Create an account to join the conversation.
- rawling
-
- Offline
- Junior Member
- Posts: 23
Please Log in or Create an account to join the conversation.
- Mary Jezierski
-
- Offline
- New Member
- Posts: 4
Ben Chesters said:
Thank you very much for this, much appreciated. emre said:
ı made manuel metas. I modifeid some page and db. And İt worked.----DB CHANGE/UPDATE
addALTER TABLE `jos_k2_categories` ADD `metadesc` text NOT NUL
>
ALTER TABLE `jos_k2_categories` ADD `metakey` text NOT NUL
>
Please Log in or Create an account to join the conversation.
- Dario Pintarić
-
- Offline
- Junior Member
- Posts: 20
Thank u very much 4 this :)
Please Log in or Create an account to join the conversation.
- prosper win
-
- Offline
- New Member
- Posts: 2
It's work! Great solution for me.
Please Log in or Create an account to join the conversation.