-
AuthorPosts
-
October 22, 2015 at 11:43 am #706539
Hi, in my web , articles in code haven’t got parameters for schema. An
Example:
If I put this web in this url : https://developers.google.com/structured-data/testing-tool/ has an error
I need to display in google search rich snippets.
Solution??? Thank you
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
October 23, 2015 at 4:17 am #752580Hi @guelfus,
You can try following these steps :
- Open file templates/ja_teline_v/html/layouts/joomla/content/image/image.php and look for this line :
<img <?php echo $caption ?> src="<?php echo htmlspecialchars($img); ?>" alt="<?php echo htmlspecialchars($alt); ?>" itemprop="thumbnailUrl"/>
add meta tag there as below :
<meta itemprop="image" content="<?php echo htmlspecialchars($img); ?>" /> <img <?php echo $caption ?> src="<?php echo htmlspecialchars($img); ?>" alt="<?php echo htmlspecialchars($alt); ?>" itemprop="thumbnailUrl"/>
- Open file templates/ja_teline_v/html/layouts/joomla/content/item/default.php and look for this line :
<?php echo JLayoutHelper::render('joomla.content.item_title', array('item' => $item, 'params' => $params, 'title-tag'=>'h1')); ?>
also add meta tag as below :
<meta itemprop="headline" content="<?php echo $this->escape($this->item->title); ?>" /> <?php echo JLayoutHelper::render('joomla.content.item_title', array('item' => $item, 'params' => $params, 'title-tag'=>'h1')); ?>
October 23, 2015 at 3:07 pm #752637Hi, I have realized this changes but not is correct. See image. I have send my files.
Please fix this problem but in google search not display info.
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
October 28, 2015 at 3:53 pm #753074Hi @guelfus,
Sorry for the delay in getting back to you, here’s the complete solution :
- About the change in file templates/ja_teline_v/html/layouts/joomla/content/image/image.php, instead of adding meta data as described before, use this instead :
<meta itemprop="image" content="<?php echo JURI::base().htmlspecialchars($img); ?>" /> <img <?php echo $caption ?> src="<?php echo htmlspecialchars($img); ?>" alt="<?php echo htmlspecialchars($alt); ?>" itemprop="thumbnailUrl"/>
- And the code for headline in templates/ja_teline_v/html/layouts/joomla/content/item/default.php, update as below instead:
<?php $input = JFactory::getApplication()->input; $id = $input->getInt('id'); //get the article ID $article = JTable::getInstance('content'); $article->load($id); echo $article->get('title'); // display the article title ?> <meta itemprop="headline" content="<?php echo $article->get('title'); ?>" /> <?php echo JLayoutHelper::render('joomla.content.item_title', array('item' => $item, 'params' => $params, 'title-tag'=>'h1')); ?>
fbernardello Friendfbernardello
- Join date:
- February 2015
- Posts:
- 287
- Downloads:
- 16
- Uploads:
- 35
- Thanks:
- 51
- Thanked:
- 2 times in 2 posts
February 24, 2016 at 6:24 pm #889918Dear support,
I’m having the same problem, but this solution is not working.Regards,
FedericoAdam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
February 25, 2016 at 7:56 am #890120Hi @fbernardello,
Just edited my reply so you can see it more clearly, please recheck.
fbernardello Friendfbernardello
- Join date:
- February 2015
- Posts:
- 287
- Downloads:
- 16
- Uploads:
- 35
- Thanks:
- 51
- Thanked:
- 2 times in 2 posts
June 17, 2016 at 1:39 pm #941481Dear Support, the old solution is not working anymore with the new version of the template. If I try to follow it now, it breaks my layout.
Now, when I try to share a article on G+ using the button you can find in my pages, the share "abstract" is not correct:
- main image is ok
- title is wrong: it uses always the author (my name)
- link is ok
See, as example:
http://www.epadova.com/vita-notturna-padova/locali-estivi/navigli.htmIt was warking after your solution with the old version of the template.
Could you please help?
Regards, Federico
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
June 20, 2016 at 3:52 am #941991Hi,
You can follow my solution below, it will help you to solve this problem on your site
- Open templates/ja_teline_v/html/layouts/joomla/content/item/default.php file
find and change
<?php if ($sharing_tools): ?> <?php echo JLayoutHelper::render('joomla.content.sharing_tools', array()); ?> <?php endif ?>
to
<?php if ($sharing_tools): ?> <?php echo JLayoutHelper::render('joomla.content.sharing_tools', array('item' => $item)); ?> <?php endif ?>
- Open templates/ja_teline_v/html/layouts/joomla/content/sharing_tools.php file
find and change<div class="addthis_sharing_toolbox"></div>
to
<div class="addthis_sharing_toolbox" data-url="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($displayData['item']->slug, $item->catid)); ?>" data-title="<?php echo $displayData['item']->title;?>">
Hope it helps
Regards
fbernardello Friendfbernardello
- Join date:
- February 2015
- Posts:
- 287
- Downloads:
- 16
- Uploads:
- 35
- Thanks:
- 51
- Thanked:
- 2 times in 2 posts
June 20, 2016 at 4:56 pm #942184Dear @ninja Lead,
unfortunately it’s not working as expected. If I publish a G+ post, this is the result:
https://plus.google.com/+Epadova_com/posts/bGaVgv8d1CrAs you can see, the Main totle is my name; it should be the main article title, as in the past.
This is an old correct post:
https://plus.google.com/+Epadova_com/posts/USy2NxsnJeRAlso Facebook is not working properly:
https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2FePadova%2Fposts%2F1238922562808037It shows the website name, instead of the article title.
Regards,
FedericoNinja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
June 21, 2016 at 2:03 am #942254@fbernardello: I see the problem on your site and I’m not sure what did you change on your site? Please rollback any changes on your site and provide me the admin login and FTP account of your hosting via private reply. I will help you to check this bug directly on your site.
fbernardello Friendfbernardello
- Join date:
- February 2015
- Posts:
- 287
- Downloads:
- 16
- Uploads:
- 35
- Thanks:
- 51
- Thanked:
- 2 times in 2 posts
June 21, 2016 at 9:46 am #942429This reply has been marked as private.Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
June 22, 2016 at 4:39 am #942720@fbernardello: I fixed the problem on your site. Please check it again let me know if it helps
fbernardello Friendfbernardello
- Join date:
- February 2015
- Posts:
- 287
- Downloads:
- 16
- Uploads:
- 35
- Thanks:
- 51
- Thanked:
- 2 times in 2 posts
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
June 23, 2016 at 2:13 am #943077@fbernardello: Kindly clear cache of your browser and re-check it again, I see it’s working as well at my end, see the video here
-
AuthorPosts
This topic contains 16 replies, has 4 voices, and was last updated by Ninja Lead 8 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum