The (Slide) element can be found under (Extended shortcodes). If only one post is available for the Slide element, it will not display. If two posts are available, it will display properly.
I found the (Slide) element in the TagDiv composer.
The issue can be seen on the following page: https://www.wheredoitakethekids.com/place-categories/ . The last row does not display one (Slide) element.
I am using the latest version of WordPress and Newspaper. I tested this with both the Chrome and Firefox browsers.
Hello,
For me work well the slide with only one post set -> https://i.imgur.com/lZVfqST.jpg
Please let me know what plugin you use.
Thank you!
It looks like this file has the issue:
./public_html/wp-content/plugins/td-composer/legacy/Newspaper/includes/shortcodes/td_block_slide.php
if ( $this->td_query->have_posts() and $this->td_query->found_posts > 1 ) {
If you change the > sign to a >= sign, it works.
The above code is found in the render function.
Hi,
I verified your website again, and now see the slide works well -> https://i.imgur.com/n40Ut92.jpg
Thank you!
Yeah, I made that code change.
Here’s the change:
if ( $this->td_query->have_posts() and $this->td_query->found_posts >= 1 ) {
This is a bug in the Newspaper theme.
./public_html/wp-content/plugins/td-composer/legacy/Newspaper/includes/shortcodes/td_block_slide.php
...
if ( $this->td_query->have_posts() and $this->td_query->found_posts > 1 ) {
...
The slider will not show any posts if only (one) post is available. The above code should have the (>) changed to (>=). Below is what the code should be:
...
if ( $this->td_query->have_posts() and $this->td_query->found_posts >= 1 ) {
...