-
AuthorPosts
-
Grzegorz Laski Friend
Grzegorz Laski
- Join date:
- November 2015
- Posts:
- 35
- Downloads:
- 89
- Uploads:
- 2
- Thanks:
- 5
January 13, 2016 at 10:01 am #846533Hi, I check few articles in google Structure Data Testing Tool. I can’t set few requaired schema like : headline, image, publisher and mainEntityOfPage.
Can you help me with that.
My website http://www.polskatradycja.pl
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 14, 2016 at 3:45 am #847354Hi,
I checked on your site and saw your site is missing some meta tags below
author: missing and required headline: missing and required image: missing and required name: missing and required publisher: missing and required mainEntityOfPage: missing and recommended
You can have a look at the guide with meta tags and apply it into both files
templates/ja_teline_v/html/layouts/joomla/content/item/topic.php templates/ja_teline_v/html/layouts/joomla/content/item/default.php
<div itemscope itemtype="http://schema.org/NewsArticle"> <meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="https://google.com/article"/> <h2 itemprop="headline">Article headline</h2> <h3 itemprop="author" itemscope itemtype="https://schema.org/Person"> By <span itemprop="name">John Doe</span> </h3> <span itemprop="description">A most wonderful article</span> <div itemprop="image" itemscope itemtype="https://schema.org/ImageObject"> <img src="https://google.com/thumbnail1.jpg"/> <meta itemprop="url" content="https://google.com/thumbnail1.jpg"> <meta itemprop="width" content="800"> <meta itemprop="height" content="800"> </div> <div itemprop="publisher" itemscope itemtype="https://schema.org/Organization"> <div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject"> <img src="https://google.com/logo.jpg"/> <meta itemprop="url" content="https://google.com/logo.jpg"> <meta itemprop="width" content="600"> <meta itemprop="height" content="60"> </div> <meta itemprop="name" content="Google"> </div> <meta itemprop="datePublished" content="2015-02-05T08:00:00+08:00"/> <meta itemprop="dateModified" content="2015-02-05T09:20:00+08:00"/> </div>
Besides that, I forwarded this problem to the development team. They will check and fix it next version.
Regards
Grzegorz Laski FriendGrzegorz Laski
- Join date:
- November 2015
- Posts:
- 35
- Downloads:
- 89
- Uploads:
- 2
- Thanks:
- 5
January 14, 2016 at 9:06 pm #848116It’s almost done, but I still need help.
I add – itemprop="image" – and now SDTT want to add itemprop for size <meta itemprop="width" content=""> <meta itemprop="height" content=""> I can’t find where I should add this ?
Furthermore I have no idea how can I use mainEntityOfPage – can you help me?
Regards
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 15, 2016 at 2:55 am #848242You can’t use width and height meta tags but you want to do, you can add it into image tab from templates/ja_teline_v/html/layouts/joomla/content/image/image.php file
About to use mainEntityOfPage you can add it with from into title article from plugins/system/t3/base-bs3/html/layouts/joomla/content/item_title.php file with form
<a itemprop="mainEntityOfPage" href="<?php echo $url ?>"><?php echo $this->escape($item->title); ?></a>
Hope it helps
Grzegorz Laski FriendGrzegorz Laski
- Join date:
- November 2015
- Posts:
- 35
- Downloads:
- 89
- Uploads:
- 2
- Thanks:
- 5
January 18, 2016 at 11:00 am #851653MainEntityOfPage works fine but still I have two problems.
-
Where Can I add meta tags for publisher
- I’m not sure where exactly should I add meta tags for width and height.
$item = $displayData['item']; $params = $displayData['params']; $title_tag = $displayData['title-tag']; $canEdit = $params->get('access-edit'); if (empty ($item->catslug)) { $item->catslug = $item->category_alias ? ($item->catid.':'.$item->category_alias) : $item->catid; } $url = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug)); $uri = JUri::getInstance(); $prefix = $uri->toString(array('scheme', 'host', 'port')); ?> <header class="article-header clearfix"> <<?php echo $title_tag; ?> class="article-title" itemprop="name"> <?php if ($params->get('link_titles')) : ?> <a itemprop="mainEntityOfPage" href="<?php echo $url ?>" itemprop="url" title="<?php echo $this->escape($item->title); ?>"> <?php echo $this->escape($item->title); ?></a> <?php else : ?> <?php echo $this->escape($item->title); ?> <meta itemprop="url" content="<?php echo $prefix.$url ?>" /> <?php endif; ?> </<?php echo $title_tag; ?>> <?php if ($item->state == 0) : ?> <span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span> <?php endif; ?> <?php if (strtotime($item->publish_up) > strtotime(JFactory::getDate())) : ?> <span class="label label-warning"><?php echo JText::_('JNOTPUBLISHEDYET'); ?></span> <?php endif; ?> <?php if ((strtotime($item->publish_down) < strtotime(JFactory::getDate())) && $item->publish_down != '0000-00-00 00:00:00') : ?> <span class="label label-warning"><?php echo JText::_('JEXPIRED'); ?></span> <?php endif; ?> </header>
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 19, 2016 at 2:33 pm #854960Hi
You can take a look on the steps given below :- Open templates/ja_teline_v/html/layouts/joomla/content/image/image.php file
Find
<img <?php echo $caption ?> src="<?php echo htmlspecialchars($img); ?>" alt="<?php echo htmlspecialchars($alt); ?>" itemprop="thumbnailUrl"/>
and add script below after it
<meta itemprop="width" content="800"> <meta itemprop="height" content="800">
- About publisher tag, open templates/ja_teline_v/html/layouts/joomla/content/info_block/blog_block.php file, you will see the way to add itemprop="datePublished" tag
<time datetime="<?php echo JHtml::_('date', $displayData['item']->publish_up, 'c'); ?>" itemprop="datePublished">
Let me know if it helps .
Grzegorz Laski FriendGrzegorz Laski
- Join date:
- November 2015
- Posts:
- 35
- Downloads:
- 89
- Uploads:
- 2
- Thanks:
- 5
January 20, 2016 at 10:47 am #863124Image size and datePublished works good.
But still I need Publisher. Please looka at this code. I add this into
ROOT/templates/ja_teline_v/html/layouts/joomla/content/item/default.php
but publisher.logo doesn’t work.Check this article in Google SDTT
http://www.polskatradycja.pl/top-10/festiwale-folkowe.html<meta itemprop="publisher" content="PolskaTradycja"> <meta itemprop="publisher.logo" content="http://www.polskatradycja.pl/images/banners/nowe-logo.png"> <meta itemprop="publisher.logo.url" content="http://www.polskatradycja.pl/images/banners/nowe-logo.png"> <meta itemprop="publisher.logo.height" content="50"> <meta itemprop="publisher.logo.width" content="150">
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
Grzegorz Laski FriendGrzegorz Laski
- Join date:
- November 2015
- Posts:
- 35
- Downloads:
- 89
- Uploads:
- 2
- Thanks:
- 5
January 20, 2016 at 6:39 pm #863494It works greate.
Thx a lotNinja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 20, 2016 at 6:47 pm #863498Yes, I am very glad to help you out. Now, I will close this thread. If you have any further assistance, please don’t hesitate to contact us.
-
AuthorPosts
This topic contains 9 replies, has 2 voices, and was last updated by Ninja Lead 8 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum