Soho Theme Data Post Snippet

On the newer Soho Blogger themes, the post snippets is unavailable & not displayed for homepage (isHomepage) & index pages (isMultipleItems). Users are required to add additional markup inside Theme > Edit HTML & there is no easy way around this. Soho Blogger Theme : Add Post Snippet at Homepage & Index Pages


Here's how:-

  • Go to Theme > Edit HTML 
  • Select Blog1 widget.
  • Scroll, find  & expand <b:includable id='post' var='post'> (#!)
  • Scoll a bit & find this code <div class='snippet-thumbnail'> (#2)
  • Further down below this, you will reach this code <b:include data='post' name='postTitle'/> (#3)
  • Now add this Blogger snippet operator tags below the above target:-

<p class='post-body-snippet'>
  <b:eval expr='snippet( data:post.body, { length: 300 })' />
</p>

  • Now your codes will roughly will look like so:-

... {{ codes }} ...


  <b:else/>
    <b:include name='headerByline'/>
  </b:if>
  <b:include data='post' name='postTitle'/> <!-- #3 -->
  <p class='post-body-snippet'>
    <b:eval expr='snippet( data:post.body, { length: 300 })' />
  </p>
</b:if>
<b:include data='post' name='postFooter'/>


... {{ codes }} ...

  • Highlighted yellow is the added HTML & data snippet operator.
  • Click Save Theme
  • Preview you changes. 

You can set the amount of text to display at highligjted green. Currently the post snippet displays 300 character counts.

Use image above as your reference on how it should look like for your newly added codes.

You can also style your new snippets by using Theme > Customize > Advanced > Add CSS & add below CSS markup

.post-body-snippet {

  /* your CSS styles */

}

3 comments:

  1. Thanks for sharing this Blogger data tags snippets. Useful for dynamic blog themes implementations. ;)

    ReplyDelete
    Replies
    1. Thanks for dropping by guys. Great work you've done & contributed for the community. Really appreciate it!...

      Delete
  2. It was an interesting post to go through and yet there are many things that needed to be elaborated so far. From that we are able to get the right answer for the better evaluation.

    ReplyDelete

Insert search keyword(s) & press enter...

Subscribe & Get Latest Stories via Mail...

 
Our website development is made possible by displaying online advertisements.
Please consider supporting us & our projects by disabling your Ad Blocker. Thank You.
Our website requires javascripts turned on for best user experience.
Please consider to turn on your web browser javascript. Thank You.
GDPR: Data submitted at our site is managed by 3rd party processors. Read more on how data is collected, managed & processed at our site. Learn More