WordPress.org

Forums

Shortcode wont work! (5 posts)

  1. artomal
    Member
    Posted 2 years ago #

    Hello,

    I've tried to use shortcode but it doesnt work, I added those lines in my tempalte functions.php file

    add_shortcode('sayhello', 'sayhello');
    
    function sayhello(){
    	echo "Helloooooo!";
    }

    I write in post HTML section tag [sayhello] but it wont work... Whats the problem?

  2. keesiemeijer
    moderator
    Posted 2 years ago #

    Try:

    return "Helloooooo!";

    http://codex.wordpress.org/Shortcode_API

  3. artomal
    Member
    Posted 2 years ago #

    still doesn't work

  4. keesiemeijer
    moderator
    Posted 2 years ago #

    What exactly doesn't work? Is "Helloooooo!" displayed in the place where you inserted [sayhello] in the post content? Or does it display [sayhello] without converting it?

  5. artomal
    Member
    Posted 2 years ago #

    display [sayhello] without converting

    [ Not 10 minutes and you're bumping already? Don't do that's not permitted here. If it's really that urgent then consider hiring someone. ]

Topic Closed

This topic has been closed to new replies.

About this Topic