Add snippets to the Emporio theme

A lot of people love the image-focused look of the newer Emporio template. This article explains how to tweak your template's XML to add a short snippet to the Emporio posts - unfortunately, there's no easy way to add in snippets for Emporio, without customizing the markup. But, if you're feeling brave, head to:

Theme -> Edit HTML -> Jump to Widget -> Blog 1

If you search for 'snippet-container', you'll come across:

<div class='snippet-container r-snippet-container'>
  <div class='r-snippetized'>
    <data:post.title />
  </div>
  <b:if cond='data:post.title != ""'>
    <div class='snippet-fade r-snippet-fade hidden'></div>
  </b:if>
</div>

Notice that it's just got the title. You could change it to add something like:

<div class='snippet-container r-snippet-container'>
  <div class='r-snippetized'>
    <data:post.title />
    <div class='snippet-body'>
      <b:eval expr='snippet(data:post.body, { length: 100 })' />
    </div>
  </div>
  <b:if cond='data:post.title != ""'>
    <div class='snippet-fade r-snippet-fade hidden'></div>
  </b:if>
</div>

Which, when rendered, will look something like this:



Happy snippeting!

Comments

  1. Thanks a lot. Just what I needed.

    Is it also possible to see two lines of text (besides the title)? Expanding the lenght in the Widget doesn't help, because the posts/blocks have a maximum height. Is het possible to change this hight of these blocks?

    ReplyDelete
  2. It seems to be a little bit more complicated. On my desktop (Firefox and IE) I only see one line of text, but om my mobile I see much more text. Is it possible to change this view of the posts/blocks when people visit my blog on a desktop?

    ReplyDelete
  3. hi please share a post about Accelerated Mobile Pages like your blog

    ReplyDelete
  4. hey! what's up!
    i want to konw that are you using dynamic template on your blog and how do you approve the adsense for your blog.....
    is your blog too old please help me to approve it for adsense

    ReplyDelete

Post a Comment

Popular posts from this blog

Make my background image responsive

Filter out certain labels from my Blog Homepage

Change the landing page of my blog