as I do so that the image also takes me to the post

0

I am using blogger and the title of the post obviously takes me to the post when I clicked, but the image does not, and I want it to do it too, this is the code:

title code of the post:

<b:includable id='postTitle' var='post'>
  <a expr:name='data:post.id'/>
  <b:if cond='data:post.title != &quot;&quot;'>
    <h3 class='post-title entry-title'>
      <b:if cond='data:post.link or (data:post.url and data:view.url != data:post.url)'>
        <a expr:href='data:post.link ?: data:post.url'><data:post.title/></a>
      <b:else/>
        <data:post.title/>
      </b:if>
    </h3>
  </b:if>
</b:includable>

image code:

 <b:includable id='postBodySnippet' var='post'>
      <div class='container post-body entry-content' expr:id='&quot;post-snippet-&quot; + data:post.id'>

        <b:if cond='data:post.featuredImage'>
          <div class='snippet-thumbnail'>

            <b:include data='{                                     image: data:post.featuredImage,                                     imageSizes: [32, 64, 128, 256],                                     imageRatio: &quot;1:1&quot;,                                     sourceSizes: &quot;(max-width: 800px) 20vw, 128px&quot;                                  }' name='responsiveImage'/>
          </div>
        </b:if>

        <b:include cond='data:post' data='post' name='postSnippet'/>
      </div>
    </b:includable>

What do I do to make him do the same as the title?

    
asked by Header90 04.07.2018 в 08:44
source

1 answer

1

Simply add the link:

<b:includable id='postBodySnippet' var='post'>
  <div class='container post-body entry-content' expr:id='&quot;post-snippet-&quot; + data:post.id'>

    <b:if cond='data:post.featuredImage'>

      <a expr:href='data:post.link ?: data:post.url'>
        <div class='snippet-thumbnail'>
          <b:include data='{image: data:post.featuredImage, imageSizes: [32, 64, 128, 256], imageRatio: "1:1", sourceSizes: "(max-width: 800px) 20vw, 128px" }' name='responsiveImage'/>
        </div>
      </a>

    </b:if>

    <b:include cond='data:post' data='post' name='postSnippet'/>
  </div>
</b:includable>
    
answered by 04.07.2018 в 10:09