WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Shortcodes not working (2 posts)

  1. dstars5
    Member
    Posted 8 months ago #

    Hey guys,

    I am trying to get a feel for shortcodes, but my test is not working properly. I want to to change [test] with <p>TEST TEXT</p>, but when I put [test] in the page editor, no text shows up.

    Here is what is in my functions.php:

    function test() {
      return '<p>TEST TEXT</p>';
    }
    
    add_shortcode('test', 'test');

    and then I have [test] as the only thing on the page. I am running on localhost, if that matters. Does anyone know what I am doing wrong?

    Thank you!

  2. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

Topic Closed

This topic has been closed to new replies.

About this Topic