• Resolved jgtorcal

    (@jgtorcal)


    Hi,

    I want to notify in every post update with this code in function.php, but it seems that it’s not working.

    add_action( 'save_post', 'wpse41912_save_post' );
    	function wpse41912_save_post()
    	{
    		do_shortcode('[telegram_mess  message="mec" chatids="" token="" showsitename="1" showip="0" showcity="0" ]');
    		?>
    		<script>
    			console.log('fire');
    		</script>
    		<?php
    	}

    I can send notifications by the admin settings but not with shortcode.
    Any help please?

The topic ‘shortcode not working’ is closed to new replies.