• Resolved iavinash

    (@iavinash)


    Hello All,

    I just noticed that featured post is not working if there is no image attached with the post and featured post count is more than 1. Below is my setting

    Featured Category : Hot News
    Featured post count : 3

    I have more than 3 posts with categorie “Hot News” but non of them have image. When I change the Featured post count to 1 latest post appears but if the count is more than 1 nothing appears ??

    Thanks,
    Avinash

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter iavinash

    (@iavinash)

    Thumbnail Placeholder : OFF
    Thumbnail Comment Count : OFF

    @iavinash – it appears that’s how the theme is designed. If Featured post count > 1 then the page script runs to create the slider. If none of the featured posts have a Featured Image, and Thumbnail Placeholder is Off, then the slider has nothing to display so it’s not loaded. The posts are generated in the page and ready to go; there’s just nothing to display them. If you set Thumbnail Placeholder On, or if at least one of the posts has a Featured Image, then all the featured posts will be displayed in the slider.

    If you want to force the slider to load without featured images or thumbnail placeholders:
    1. Copy the /inc/featured.php file from the parent theme to your child theme /inc folder.
    2. Edit the child theme file and either comment out the two additional lines using // as shown here, or just replace the entire <script> block of code:

    <script type="text/javascript">
      // Check if first slider image is loaded, and load flexslider on document ready
      jQuery(document).ready(function(){
        var firstImage = jQuery('#flexslider-featured').find('img').filter(':first'),
        checkforloaded = setInterval(function() {
          var image = firstImage.get(0);
    
    //    if (image.complete || image.readyState == 'complete' || image.readyState == 4) {
    
            clearInterval(checkforloaded);
    
            jQuery('#flexslider-featured').flexslider({
              animation: "slide",
              useCSS: false, // Fix iPad flickering issue
              slideshow: false,
              directionNav: true,
              controlNav: true,
              pauseOnHover: true,
              slideshowSpeed: 7000,
              animationSpeed: 400,
              smoothHeight: true,
              touch: false
            });
    
    //	  }
    
        }, 20);
      });
    </script>
    Thread Starter iavinash

    (@iavinash)

    Thanks bdbrown,

    As always your reply was helpful and was able to fix the issue.

    Thanks,
    Avinash

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Featured post not working if there is no image’ is closed to new replies.