[BUG + FIX] IOS Slider doesn't appear when only one post is fetched

Posted in: Newspaper
Post count: 13

IOS Slider doesn’t appear (it doesn’t exist in the outputted HTML) when fetching from category which has only one post

i don’t know if this is a bug or it’s by-design.

It didn’t bother me much, i just added another post in the category and worked, just wanted to let you know.

For anybody feeling adventurous with code, this can be “fixed” by editing Newspaper\includes\shortcodes\td_block_slide.php inside the render function

change


 if ($this->td_query->have_posts() and $this->td_query->found_posts > 1 )

to


 if ($this->td_query->have_posts() and $this->td_query->found_posts > 0 )

i don’t know if this has any side-effects didn’t have time to test edge cases.

Also the above fix is not official, i dont work for tagdiv, so if something explodes or bite you its not my fault. 😛

  • This topic was modified 10 years by dimitris.
  • This topic was modified 10 years by dimitris.
  • This topic was modified 10 years by dimitris.
  • This topic was modified 10 years by dimitris.
  • This topic was modified 10 years by dimitris.
  • This topic was modified 10 years by dimitris.
Viewing 1 post (of 1 total)
The forum ‘Newspaper’ is closed to new topics and replies.