简体   繁体   English

如何将博客缩略图链接到其帖子?

[英]How do I make a blogger thumbnail link to its post?

I'm not very good at coding, and trying hard to figure out how to make my thumbnails link to articles.我不太擅长编码,并且努力弄清楚如何让我的缩略图链接到文章。

 <div class='post hentry uncustomized-post-template' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>
          <b:if cond='data:post.thumbnailUrl'>
            <meta expr:content='data:post.thumbnailUrl' itemprop='image_url'/>
          </b:if>
          <meta expr:content='data:blog.blogId' itemprop='blogId'/>
          <meta expr:content='data:post.id' itemprop='postId'/>

          <a expr:name='data:post.id'/>
          <b:if cond='data:post.title'>
            <h3 class='post-title entry-title' itemprop='name'>
              <b:if cond='data:post.link'>
                <a expr:href='data:post.link'><data:post.title/></a>
              <b:elseif cond='data:post.url and data:blog.url != data:post.url'/>
                <a expr:href='data:post.url'><data:post.title/></a>
              <b:else/>
                <data:post.title/>
              </b:if>
            </h3>
          </b:if>

          <div class='post-header'>
            <div class='post-header-line-1'/>
          </div>

          <div class='post-body entry-content' expr:id='&quot;post-body-&quot; + data:post.id' itemprop='articleBody'>
            <data:post.body/>
            <div style='clear: both;'/> <!-- clear for photos floats -->
          </div>

Everytime when I click on a thumbnail, it links to the original image.每次单击缩略图时,它都会链接到原始图像。 This is very annoying.这很烦人。 I want to know what conditions or codes to add to make thumbnails links to posts directly.我想知道要添加哪些条件或代码以使缩略图直接链接到帖子。

replace data:post.thumbnailUrl by data:post.urldata:post.thumbnailUrl替换为data:post.url

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM