Tagged: Placeholder, post slider
Hi guys,
is it possible to show an empty message (e.g. “Sorry, no news at the moment”) for the post slider element?
We are using it in a clients website for different categories (one slider element per category). If a category is empty the slider element will be empty and our client would like to show some sort of empty message (or placeholder text) if there are no posts instead of blank space.
Thank you!
Best,
Ernst
Hey webpunks,
Yes, it is possible, but it will require the file /enfold/config-templatebuilder/avia-shortcodes/postslider/postslider.php to be modified.
This code:
if( empty( $this->entries ) || empty( $this->entries->posts ) )
{
return $output;
}
to
if( empty( $this->entries ) || empty( $this->entries->posts ) )
{
return "Sorry, no news at the moment";
}
If you need further assistance please let us know.
Best regards,
Victoria
Hi Victoria,
perfect – is it possible to load the postslider.php file in the child theme? So that we don’t lose these changes in the case of an update.
Thanks!
Hi webpunks,
Yes, you need to copy this file to the child theme, preserving folder structure.
https://kriesi.at/support/topic/new-shortcodes-or-edited-shortcodes-in-child-theme/
Best regards,
Victoria