Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • guelfus Friend
    #706539

    Hi, in my web , articles in code haven’t got parameters for schema. An

    Example:

    http://www.armas.es/mundo-armas/32885-polonia-anuncia-nueva-licitacion-para-dotarse-de-150-rifles-de-francotirador

    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 Moderator
    #752580

    Hi @guelfus,

    You can try following these steps :

    1. 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"/>
    2. 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')); ?>
    guelfus Friend
    #752637

    Hi, 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.

    http://www.armas.es/militar/32888-israel-adopta-la-carabina-ruger-sr-22-para-la-funcion-de-sniper-menos-letal

    https://developers.google.com/structured-data/testing-tool/

    Adam M Moderator
    #718773

    Hi @guelfus,

    Please provide a temporary FTP account via private reply, I will check this matter for you then.

    Adam M Moderator
    #753074

    Hi @guelfus,

    Sorry for the delay in getting back to you, here’s the complete solution :

    1. 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"/>
    2. 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 Friend
    #889918

    Dear support,
    I’m having the same problem, but this solution is not working.

    Regards,
    Federico

    Adam M Moderator
    #890120

    Hi @fbernardello,

    Just edited my reply so you can see it more clearly, please recheck.

    fbernardello Friend
    #941481

    Dear 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:

    1. main image is ok
    2. title is wrong: it uses always the author (my name)
    3. link is ok

    See, as example:
    http://www.epadova.com/vita-notturna-padova/locali-estivi/navigli.htm

    It was warking after your solution with the old version of the template.

    Could you please help?

    Regards, Federico

    Ninja Lead Moderator
    #941991

    Hi,

    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 Friend
    #942184

    Dear @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/bGaVgv8d1Cr

    As 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/USy2NxsnJeR

    Also Facebook is not working properly:
    https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2FePadova%2Fposts%2F1238922562808037

    It shows the website name, instead of the article title.

    Regards,
    Federico

    Ninja Lead Moderator
    #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 Friend
    #942429
    This reply has been marked as private.
    Ninja Lead Moderator
    #942720

    @fbernardello: I fixed the problem on your site. Please check it again let me know if it helps

    fbernardello Friend
    #942835

    Hi @ninja Lead,
    I tryed rigth now, but nothing changed…

    F.

    Ninja Lead Moderator
    #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

Viewing 15 posts - 1 through 15 (of 17 total)

This topic contains 16 replies, has 4 voices, and was last updated by  Ninja Lead 7 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum