By Austin Cox on Sunday, 23 February 2014
Posted in General Issues
Replies 5
Likes 0
Views 1.2K
Votes 0
We're all familiar with meta tags like "description" and "keywords". And in Easyblog we can edit those in our blog posts. I was wondering if there was a way to duplicate the
<meta name="keywords">
to
<meta name="news_keywords">


Basically just need to know how to add the "news_keywords" meta to easyblog since it already creates it by default in "keywords".
Hello Austin,

Sorry for the late reply. In that case you will need to go to this file,

JOOMLA/components/com_easyblog/helpers/helper.php

and change the codes in line 3134 to 3137 from
if ( !empty( $result->keywords ) )
{
$document->setMetadata('keywords', $result->keywords);
}

to
if ( !empty( $result->keywords ) )
{
$document->setMetadata('keywords', $result->keywords);
$document->setMetadata('news_keywords', $result->keywords);
}

Please note that this will make the "news_keywords" information same as the keywords. If you need it to be dynamically different I'm afraid there is no way to achieve this without making big changes to the whole structure of EasyBlog. Hope this helps.

Thanks!
·
Monday, 24 February 2014 11:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Austin,

I am really sorry for the delay of this reply as it is a weekend for us here. You need to edit the file /components/com_easyblog/views/entry/view.html.php and insert the codes below:


$document->setMetadata( 'news_keywords', 'yourkeywords,here' );
·
Sunday, 23 February 2014 13:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Okay. That line of code does add the "news_keywords" meta tag to the page source, but if I put 'yourkeywords,here', it just does that for every page.

I need it to put the keywords from the post into the new meta tag. Since the keywords change per each new post, it needs to be dynamic, just like regular keywords.
·
Monday, 24 February 2014 02:09
·
0 Likes
·
0 Votes
·
0 Comments
·
That was it. Problem solved, thanks.
·
Monday, 24 February 2014 20:16
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome Austin Glad that your issues are resolved now.
·
Monday, 24 February 2014 22:50
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post