Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • robov99
    Participant

    I want a shortcode inside the banner that sometimes renders somethign. However when it renders nothing, then the bar is still shown. Guess that is a small buggy

    Hi @robov99,

    Thanks for reporting. I’ve added this to my todo list to handle this scenario.

    This is quite rare condition where someone would every want to display an announcement empty.
    Also in your case the message is coming out of a shortcode in random.

    I’ll sure handle this in the next version.

    For now if possible, you could do a simple code chagne like below.
    This may or may not work as I’m yet to investigate the complete output on your side.
    Please deactivate the plugin before making any code change.

    In announcer/includes/display.php replace line 115

    $html .= do_shortcode( wpautop( $content ) );

    with this

    $final_content = do_shortcode( wpautop( $content ) );
    $final_content = trim( $final_content );
    if( empty( $final_content ) ){
        return '';
    }
    $html .= $final_content;
    

    Thanks,
    Aakash

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

Subscribe for updates

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam.