• Resolved Dave

    (@ccsm)


    We’re updating our website and changing themes. The new theme doesn’t include the old these shortcodes, and we have about 3,000 pages on the site. I’ve tried to strip these shortcodes out a lot of different ways, but I’m not having much luck.

    So I’d like to create a shortcode in the new theme that has the same names as the old shortcodes, but instead of do anything, I’d like the new shortcodes to just return the content. So they’ll be there, but they won’t do anything.

    So how do you make a shortcode that doesn’t do anything except return the content?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    function dummy_shortcode($atts, $content) {
       return $content;
    }
    add_shortcode( 'shortcode1', 'dummy_shortcode' );
    add_shortcode( 'shortcode2', 'dummy_shortcode' );

    and so on…

    Thread Starter Dave

    (@ccsm)

    Perfect. Thank you so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Looking for shortcode help’ is closed to new replies.