• Resolved bowenac

    (@bowenac)


    So I looked through the shortcode files and have tried a few different things which none work. I’m not even sure how this plugin even works to be honest. I would have done it a lot different. But my question is do you have a way to show a message if no post “events” are found?

    Where would I do this at?

    https://www.ads-software.com/plugins/event-rocket/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Barry

    (@barryhughes-1)

    Hi bowenac – great question!

    So you’re referring to the [event_embed] shortcode here right? Seems like adding a nothing found message shouldn’t be too hard – how about using the eventrocket_embed_event_output filter hook?

    add_filter( 'eventrocket_embed_event_output', 'event_rocket_empty_result_msg' );
    
    function event_rocket_empty_result_msg( $output ) {
    	if ( empty( $output ) ) return 'Nothing found!';
    	return $output;
    }

    I’ll certainly make a note to include something a little more user friendly in a future release, though.

    I’m not even sure how this plugin even works to be honest. I would have done it a lot different.

    I would love to hear any concerns you have and remember that you are more than welcome to submit pull requests or you can create individual issues for problem areas over on GitHub.

    Thanks!

    Thread Starter bowenac

    (@bowenac)

    Awesome thanks, I just used jQuery to append if the eventrocket class was not found etc. But I replaced it with this.

    I tried this yesterday but was using the wrong filter I guess.

    But yea maybe add that in the faq or something.

    Thanks,
    Adam

    Plugin Author Barry

    (@barryhughes-1)

    Cool.

    But yea maybe add that in the faq or something.

    Good idea. I also logged an issue for myself to add either a nothing-found message param to the shortcode or a nothing-found template param (and probably will do both).

    Thanks again!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Message if no events…’ is closed to new replies.