Slide block not shown when it contains only 1 post

Posted in: Newspaper
Post count: 21

In Newspaper 4, a slide block could be defined also when it only contains 1 post. In Newspaper 6, it is not shown any more. It needs at least two posts to be shown.

The reason is the following line in td_block_side.php:
if ($this->td_query->have_posts() and $this->td_query->found_posts > 1 )

If it is replaced by
if ($this->td_query->have_posts())
old behaviour is restored.

In fact, the change does not make sense to me. It could always be that you start a new page with a slide, and at the beginning there will be only 1 post for a tag, but more will come.

Post count: 7909

Hi,

I have asked the developers and told me that using only 1 article on slider create some issues with it and they decided to add this condition for IOS Slider to work properly(there is a bug in IOS slider not in the theme). You can remove that code if you need to add only an articles there.

Thanks!

Post count: 21

Hi Alin,

thanks for your reply and the explanation.

I have another suggestion that you might consider for next version: If there is only 1 article to show in a slider the whole slider code is not needed. So, why don’t you just output the single article? And only if there are more articles the slider code is actually included.

Then, the bug is avoided but the block is working no matter how many articles there are.

Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.