在Blogger中使用代码段摘要时更改读取更多文本的问题

时间:2021-11-24 07:22:53

I'm trying to change the text of the read more button in Blogger. I've been searching everywhere in the code for or but it doesn't exist.

我正在尝试更改Blogger中read more按钮的文本。我一直在代码中搜索,但它不存在。

But here's what I found:

但这是我发现的:

    <div class='mobile-index-arrow'>&amp;rsaquo;</div>

    <div class='mobile-index-contents'>
      <b:if cond='data:post.thumbnailUrl'>
        <div class='mobile-index-thumbnail'>
          <div class='Image'>
            <img expr:src='data:post.thumbnailUrl'/>
          </div>
        </div>
      </b:if>

      <div class='post-body'>
        <b:if cond='data:post.snippet'><data:post.snippet/></b:if>
      </div>
    </div>    

So I guess I have to add something to this "snippet part", but I don't really know what to add... Please, does anyone know how to change the read more text? Thanks!

所以我想我必须在这个“片段”中添加一些东西,但我真的不知道要添加什么...请问,有没有人知道如何更改阅读更多文本?谢谢!

1 个解决方案

#1


2  

Method 1:

You can change the text in read more button from Blogger Layout.

您可以在Blogger布局中更改“阅读更多”按钮中的文本。

Go to Dashboard > Layout > Main > Edit

转到仪表板>布局>主要>编辑

在Blogger中使用代码段摘要时更改读取更多文本的问题

Method 2:

Go to Dashboard > Template > Edit HTML

转到仪表板>模板>编辑HTML

In post section find this code (below post-body part)

在帖子部分找到这个代码(在身体后部分)

    <b:if cond='data:post.hasJumpLink'>
       <div class='jump-link'>
         <a expr:href='data:post.url + &quot;#more&quot;' expr:title='data:post.title'><data:post.jumpText/></a>
       </div>
    </b:if>

Replace <data:post.jumpText/> with whatever text you want to display in place of Read More

替换为您要显示的任何文本,而不是Read More

eg:

    <b:if cond='data:post.hasJumpLink'>
       <div class='jump-link'>
         <a expr:href='data:post.url + &quot;#more&quot;' expr:title='data:post.title'>View Post</a>
       </div>
    </b:if>


Method 3: Add the this script at the end of <b:includable id='post' var='post'> inside main section.

方法3:在主要部分内的 末尾添加此脚本。

    <b:if cond='data:blog.pageType not in {&quot;static_page&quot;,&quot;item&quot;}'>
        <script type='text/javascript'>
             $(&quot;#summary<data:post.id/> .post-entry a.more-link&quot;).html(&quot;<data:post.jumpText/> &lt;i class=&#39;fa fa-long-arrow-right&#39;&gt;&lt;/i&gt;&quot;);
        </script>
    </b:if>

With this you can change Read More text from dashboard, as described in Method 1.

使用此功能,您可以从仪表板更改“阅读更多”文本,如方法1中所述。

#1


2  

Method 1:

You can change the text in read more button from Blogger Layout.

您可以在Blogger布局中更改“阅读更多”按钮中的文本。

Go to Dashboard > Layout > Main > Edit

转到仪表板>布局>主要>编辑

在Blogger中使用代码段摘要时更改读取更多文本的问题

Method 2:

Go to Dashboard > Template > Edit HTML

转到仪表板>模板>编辑HTML

In post section find this code (below post-body part)

在帖子部分找到这个代码(在身体后部分)

    <b:if cond='data:post.hasJumpLink'>
       <div class='jump-link'>
         <a expr:href='data:post.url + &quot;#more&quot;' expr:title='data:post.title'><data:post.jumpText/></a>
       </div>
    </b:if>

Replace <data:post.jumpText/> with whatever text you want to display in place of Read More

替换为您要显示的任何文本,而不是Read More

eg:

    <b:if cond='data:post.hasJumpLink'>
       <div class='jump-link'>
         <a expr:href='data:post.url + &quot;#more&quot;' expr:title='data:post.title'>View Post</a>
       </div>
    </b:if>


Method 3: Add the this script at the end of <b:includable id='post' var='post'> inside main section.

方法3:在主要部分内的 末尾添加此脚本。

    <b:if cond='data:blog.pageType not in {&quot;static_page&quot;,&quot;item&quot;}'>
        <script type='text/javascript'>
             $(&quot;#summary<data:post.id/> .post-entry a.more-link&quot;).html(&quot;<data:post.jumpText/> &lt;i class=&#39;fa fa-long-arrow-right&#39;&gt;&lt;/i&gt;&quot;);
        </script>
    </b:if>

With this you can change Read More text from dashboard, as described in Method 1.

使用此功能,您可以从仪表板更改“阅读更多”文本,如方法1中所述。