Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1150181

    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

    #1150580

    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";
    			}
    
    

    Image 2019-10-23 at 20.06.39.png
    If you need further assistance please let us know.
    Best regards,
    Victoria

    • This reply was modified 5 years, 2 months ago by Victoria.
    #1150756

    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!

    #1150793

    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

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.