Blog Article Page Error, can anyone help?

Highlighted
Shopify Expert
6 0 0

Hi!

 

I'm having an issue with a blog article page not displaying the actual blog post.

 

Here's the page: https://slippersandloafers.com/blogs/high-end-brand-or-a-resurgent-brand/high-end-brand-or-a-resurge...

I've checked the theme code and can't see anything wrong with it.

Here's the code:

{% assign number_of_comments = article.comments_count %}
{% if comment and comment.created_at %}
  {% assign number_of_comments = article.comments_count | plus: 1 %}
{% endif %}
{% paginate article.comments by 5 %}
<div class="grid blog-design-4 blog-detail-section">
  <div class="container">
<div class="blog-section">
  <article class="grid__item" itemscope itemtype="http://schema.org/Article">
    {% if article.image %}
    {% assign image_alt = article.title | escape %}
   {{ article | img_url: 'master' | img_tag: image_alt, 'article__image' | link_to: article.url }}
    {% endif %}
    <div class="blog-description">
      
           <div class="blogs-sub-title">
                {% if settings.show_blog_4_date %}
		 	<p class="blog-date">
                <span data-datetime="{{ article.published_at | date: '%Y-%m-%d' }}"><span class="date">{{ article.published_at | date: '%d' }}</span><span class="month"> {{ article.published_at | date: '%b' }} </span></span>             
              </p>
                {% endif %}

                      
              </div>   


      <div class="blog_section_detail">
         {% if article.tags.size > 0 and settings.show_blog_4_tag %}
                <div class="blog-tag">
                <i class="fa fa-tags" aria-hidden="true"></i>
                {% for tag in article.tags %}
                <a class="blog-tags" href="{{ blog.url }}/tagged/{{ tag | handle }}">{{ tag }}</a>{% unless forloop.last %} <span class="meta-sep">&#44;</span> {% endunless %}
                {% endfor %}
                </div>
                {% endif %}
        
         {% if article.comments_enabled? %}
                {% assign number_of_comments = article.comments_count %}
                <p class="comments-count">{{  number_of_comments }} {{ 'blogs.comments.comments' | t }}</p>
                {% endif %}
                <p class="author">
                  {% if settings.show_blog_4_author %}            
                  <i class="zmdi zmdi-account"></i>
                  <span> {{ article.author }}</span>
                  {% endif %}
                </p>         
        
                        <h4><a href="{{ article.url }}">{{ article.title }}</a></h4>

        {% if article.excerpt.size > 0 %}
        {{ article.excerpt }}
        {% else %}
        <p class="desc">{{ article.content }}</p>
        {% endif %}


       

		
        {% if settings.social_sharing_blog %}  
        
        {% include 'social-sharing' %}
        {% endif %}
        {% comment %}
        Create links to the next and previous articles, if available.
        {% endcomment %}
        {% if blog.next_article or blog.previous_article %}
        <hr class="hr--clear hr--small">
        <p class="clearfix">
          {% if blog.previous_article %}
          <span class="left" style="text-decoration:underline";>
            {{ 'blogs.article.older_post' | t | link_to: blog.previous_article }}
          </span>
          {% endif %}
          {% if blog.next_article %}
          <span class="right" style="text-decoration:underline";>
            {{ 'blogs.article.newer_post' | t | link_to: blog.next_article }} 
          </span>
          {% endif %}
        </p>
        {% endif %}

        {% if blog.comments_enabled? %}
        <hr class="hr--clear hr--small">

        {% comment %}
        Just like blog.liquid page, define how many comments should be on each page.
        {% endcomment %}

        {% comment %}
        #comments is required, it is used as an anchor link by Shopify.
        {% endcomment %}
        <div id="comments">

          {% if comment and comment.created_at %}
          <p class="note form-success">
            {% if blog.moderated? %}
            {{ 'blogs.comments.success_moderated' | t }}
            {% else %}
            {{ 'blogs.comments.success' | t }}
            {% endif %}
          </p>
          {% endif %}

          {% if number_of_comments > 0 %}

          <h3> {% if blog.comments_enabled? %}
      {% assign number_of_comments = article.comments_count %}
      <p class="comments-count">{{  number_of_comments }} {{ 'blogs.comments.comments' | t }}</p>
      {% endif %}   </h3>
          <ul>
            {% comment %}
            If a comment was just submitted with no blank field, show it.
            {% endcomment %}
            {% if comment and comment.created_at %}
            <li id="{{ comment.id }}" class="comment first{% if article.comments_count == 0 %} last{% endif %}">
              {% include 'comment' %}
            </li>
            {% endif %}

            {% comment %}
            Showing the rest of the comments.
            {% endcomment %}
            {% for comment in article.comments %}
            <li id="{{ comment.id }}" class="comment{% unless number_of_comments > article.comments_count %}{% if forloop.first %} first{% endif %}{% endunless %}{% if forloop.last %} last {% endif %}">
              {% include 'comment' %}
            </li>
            {% endfor %}
          </ul>

          {% if paginate.pages > 1 %}
          <hr class="--clear hr--small">
          <div class="text-center">
            {% include 'pagination-custom' %}
          </div>
          {% endif %}

          <hr class="hr--clear hr--small">

          {% endif %}

          {% comment %}
          Comment submission form
          {% endcomment %}
          {% form 'new_comment', article %}

          <h3>{{ 'blogs.comments.title' | t }}</h3>

          {{ form.errors | default_errors }}

          <div class="grid">
            <p class="grid__item wide--one-half post-large--one-half large--one-half">

              <label for="CommentAuthor" class="label--hidden">{{ 'blogs.comments.name' | t }}</label>
              <input {% if form.errors contains "author" %} class="error"{% endif %} type="text" name="comment[author]" placeholder="{{ 'blogs.comments.name' | t }}" id="CommentAuthor" value="{{ form.author }}" autocapitalize="words">
            </p>
             <p class="grid__item wide--one-half post-large--one-half large--one-half">
            <label for="CommentEmail" class="label--hidden">{{ 'blogs.comments.email' | t }}</label>
            <input {% if form.errors contains "email" %} class="error"{% endif %} type="email" name="comment[email]" placeholder="{{ 'blogs.comments.email' | t }}" id="CommentEmail" value="{{ form.email }}" autocorrect="off" autocapitalize="off">
            </p>


            <label for="CommentBody" class="label--hidden">{{ 'blogs.comments.message' | t }}</label>
            <textarea {% if form.errors contains "body" %} class="error"{% endif %} name="comment[body]" id="CommentBody" placeholder="{{ 'blogs.comments.message' | t }}">{{ form.body }}</textarea>


          </div>

          {% if blog.moderated? %}
          <p><small>{{ 'blogs.comments.moderated' | t }}</small></p>
          {% endif %}

          <button type="submit" class="btn"><span>{{ 'blogs.comments.post' | t }}</span></button>

          {% endform %}

        </div>

        {% endif %}
      </div>

    </div>
  </article>
  </div>
  </div>
</div>
{% endpaginate %}

 

<script type="text/javascript">
  $(document).ready(function(){
   var post_count = $('.related-posts li.post-row').length;
      if(post_count > 2) { $('.nav_featured').css('display','block');}
      else {$('.nav_featured').css('display','none');}
      var post = $(".related-posts");
      post.owlCarousel({
        items: 2,
        itemsCustom: false,
        itemsDesktop: [1199, 2],
        itemsDesktopSmall: [980, 2],
        itemsTablet: [630, 2],
        itemsTabletSmall: false,
        itemsMobile: [479, 1],
        singleItem: false,
        itemsScaleUp: false,
        responsive: true,
        responsiveRefreshRate: 200,
        responsiveBaseWidth: window,
        autoPlay: false,
        stopOnHover: false,
        navigation: false,
        pagination:false
      });
      // Custom Navigation Events
      $(".nav_featured .next").click(function(){
        post.trigger('owl.next');
      })
      $(".nav_featured .prev").click(function(){
        post.trigger('owl.prev');
      }) 
  });
      
</script>


  
  

 

Owner @ Fat Buddha Web Design Ltd. www.fat-buddha.com
0 Likes
Highlighted
Shopify Partner
213 0 5

Hi Ben,

We should be able to help with this, would you be able to drop us an email to get an estimate?
info@antropy.co.uk

Kind regards,
Paul Feakins
www.antropy.co.uk

0 Likes
Highlighted
Shopify Expert
391 0 3

Hi Ben,

Let connect at info@bluetech.co.in to solve the error.

Thanks!

Sid

Bluetech | https://www.bluetechitservices.com | info@bluetech.co.in
0 Likes
Highlighted
Anonymous
Not applicable
1151 0 0

Hello. I would be more than happy to help you with this task. You can email me at cnscanidate@gmail.com

0 Likes
Highlighted
New Member
26 0 0

Hello,

I can surely help you. 

 

Please reach me at: troy@cisinlabs.com to disucss. 

 

Thanks 

Troy 

0 Likes
Highlighted
Tourist
39 0 1

Hi,

I can help.

You can reach me on Skype: cisin.arnold or email: arnold.cis20@gmail.com so that we can discuss this further.

Arnold

0 Likes
Highlighted
Shopify Expert
2684 67 814

Hi Ben, 

wrong forum, mate.

Basically, the only piece of code which references the article content is this:

        {% if article.excerpt.size > 0 %}
          {{ article.excerpt }}
        {% else %}
          <p class="desc">{{ article.content }}</p>
        {% endif %}

But! It looks if there is an article excerpt and outputs excerpt, and only if there is no excerpt, it outputs the full content.

Probably, should not be like this...

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com!
My post solved your problem? Like it!
I am away till Feb-15.
0 Likes
Highlighted
Shopify Partner
1166 32 213

Ben, try this code instead.

{% assign number_of_comments = article.comments_count %}
{% if comment and comment.created_at %}
  {% assign number_of_comments = article.comments_count | plus: 1 %}
{% endif %}
{% paginate article.comments by 5 %}
<div class="grid blog-design-4 blog-detail-section">
  <div class="container">
<div class="blog-section">
  <article class="grid__item" itemscope itemtype="http://schema.org/Article">
    {% if article.image %}
    {% assign image_alt = article.title | escape %}
   {{ article | img_url: 'master' | img_tag: image_alt, 'article__image' | link_to: article.url }}
    {% endif %}
    <div class="blog-description">
      
           <div class="blogs-sub-title">
                {% if settings.show_blog_4_date %}
		 	<p class="blog-date">
                <span data-datetime="{{ article.published_at | date: '%Y-%m-%d' }}"><span class="date">{{ article.published_at | date: '%d' }}</span><span class="month"> {{ article.published_at | date: '%b' }} </span></span>             
              </p>
                {% endif %}

                      
              </div>   


      <div class="blog_section_detail">
         {% if article.tags.size > 0 and settings.show_blog_4_tag %}
                <div class="blog-tag">
                <i class="fa fa-tags" aria-hidden="true"></i>
                {% for tag in article.tags %}
                <a class="blog-tags" href="{{ blog.url }}/tagged/{{ tag | handle }}">{{ tag }}</a>{% unless forloop.last %} <span class="meta-sep">&#44;</span> {% endunless %}
                {% endfor %}
                </div>
                {% endif %}
        
         {% if article.comments_enabled? %}
                {% assign number_of_comments = article.comments_count %}
                <p class="comments-count">{{  number_of_comments }} {{ 'blogs.comments.comments' | t }}</p>
                {% endif %}
                <p class="author">
                  {% if settings.show_blog_4_author %}            
                  <i class="zmdi zmdi-account"></i>
                  <span> {{ article.author }}</span>
                  {% endif %}
                </p>         
        
                        <h4><a href="{{ article.url }}">{{ article.title }}</a></h4>
 
                        <p class="desc">{{ article.content }}</p>
         


       

		
        {% if settings.social_sharing_blog %}  
        
        {% include 'social-sharing' %}
        {% endif %}
        {% comment %}
        Create links to the next and previous articles, if available.
        {% endcomment %}
        {% if blog.next_article or blog.previous_article %}
        <hr class="hr--clear hr--small">
        <p class="clearfix">
          {% if blog.previous_article %}
          <span class="left" style="text-decoration:underline";>
            {{ 'blogs.article.older_post' | t | link_to: blog.previous_article }}
          </span>
          {% endif %}
          {% if blog.next_article %}
          <span class="right" style="text-decoration:underline";>
            {{ 'blogs.article.newer_post' | t | link_to: blog.next_article }} 
          </span>
          {% endif %}
        </p>
        {% endif %}

        {% if blog.comments_enabled? %}
        <hr class="hr--clear hr--small">

        {% comment %}
        Just like blog.liquid page, define how many comments should be on each page.
        {% endcomment %}

        {% comment %}
        #comments is required, it is used as an anchor link by Shopify.
        {% endcomment %}
        <div id="comments">

          {% if comment and comment.created_at %}
          <p class="note form-success">
            {% if blog.moderated? %}
            {{ 'blogs.comments.success_moderated' | t }}
            {% else %}
            {{ 'blogs.comments.success' | t }}
            {% endif %}
          </p>
          {% endif %}

          {% if number_of_comments > 0 %}

          <h3> {% if blog.comments_enabled? %}
      {% assign number_of_comments = article.comments_count %}
      <p class="comments-count">{{  number_of_comments }} {{ 'blogs.comments.comments' | t }}</p>
      {% endif %}   </h3>
          <ul>
            {% comment %}
            If a comment was just submitted with no blank field, show it.
            {% endcomment %}
            {% if comment and comment.created_at %}
            <li id="{{ comment.id }}" class="comment first{% if article.comments_count == 0 %} last{% endif %}">
              {% include 'comment' %}
            </li>
            {% endif %}

            {% comment %}
            Showing the rest of the comments.
            {% endcomment %}
            {% for comment in article.comments %}
            <li id="{{ comment.id }}" class="comment{% unless number_of_comments > article.comments_count %}{% if forloop.first %} first{% endif %}{% endunless %}{% if forloop.last %} last {% endif %}">
              {% include 'comment' %}
            </li>
            {% endfor %}
          </ul>

          {% if paginate.pages > 1 %}
          <hr class="--clear hr--small">
          <div class="text-center">
            {% include 'pagination-custom' %}
          </div>
          {% endif %}

          <hr class="hr--clear hr--small">

          {% endif %}

          {% comment %}
          Comment submission form
          {% endcomment %}
          {% form 'new_comment', article %}

          <h3>{{ 'blogs.comments.title' | t }}</h3>

          {{ form.errors | default_errors }}

          <div class="grid">
            <p class="grid__item wide--one-half post-large--one-half large--one-half">

              <label for="CommentAuthor" class="label--hidden">{{ 'blogs.comments.name' | t }}</label>
              <input {% if form.errors contains "author" %} class="error"{% endif %} type="text" name="comment[author]" placeholder="{{ 'blogs.comments.name' | t }}" id="CommentAuthor" value="{{ form.author }}" autocapitalize="words">
            </p>
             <p class="grid__item wide--one-half post-large--one-half large--one-half">
            <label for="CommentEmail" class="label--hidden">{{ 'blogs.comments.email' | t }}</label>
            <input {% if form.errors contains "email" %} class="error"{% endif %} type="email" name="comment[email]" placeholder="{{ 'blogs.comments.email' | t }}" id="CommentEmail" value="{{ form.email }}" autocorrect="off" autocapitalize="off">
            </p>


            <label for="CommentBody" class="label--hidden">{{ 'blogs.comments.message' | t }}</label>
            <textarea {% if form.errors contains "body" %} class="error"{% endif %} name="comment[body]" id="CommentBody" placeholder="{{ 'blogs.comments.message' | t }}">{{ form.body }}</textarea>


          </div>

          {% if blog.moderated? %}
          <p><small>{{ 'blogs.comments.moderated' | t }}</small></p>
          {% endif %}

          <button type="submit" class="btn"><span>{{ 'blogs.comments.post' | t }}</span></button>

          {% endform %}

        </div>

        {% endif %}
      </div>

    </div>
  </article>
  </div>
  </div>
</div>
{% endpaginate %}

 

<script type="text/javascript">
  $(document).ready(function(){
   var post_count = $('.related-posts li.post-row').length;
      if(post_count > 2) { $('.nav_featured').css('display','block');}
      else {$('.nav_featured').css('display','none');}
      var post = $(".related-posts");
      post.owlCarousel({
        items: 2,
        itemsCustom: false,
        itemsDesktop: [1199, 2],
        itemsDesktopSmall: [980, 2],
        itemsTablet: [630, 2],
        itemsTabletSmall: false,
        itemsMobile: [479, 1],
        singleItem: false,
        itemsScaleUp: false,
        responsive: true,
        responsiveRefreshRate: 200,
        responsiveBaseWidth: window,
        autoPlay: false,
        stopOnHover: false,
        navigation: false,
        pagination:false
      });
      // Custom Navigation Events
      $(".nav_featured .next").click(function(){
        post.trigger('owl.next');
      })
      $(".nav_featured .prev").click(function(){
        post.trigger('owl.prev');
      }) 
  });
      
</script>

 

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
- Available for hiring. lixon@ecommercestudio.in
1 Like
Highlighted
Shopify Expert
6 0 0

Thank you! That has fixed it :))

Owner @ Fat Buddha Web Design Ltd. www.fat-buddha.com
0 Likes