{"id":2237,"date":"2021-07-02T08:15:16","date_gmt":"2021-07-02T00:15:16","guid":{"rendered":"https:\/\/www.intelliwolf.com\/?p=2237"},"modified":"2021-07-02T08:15:19","modified_gmt":"2021-07-02T00:15:19","slug":"add-blank-wordpress-shortcode","status":"publish","type":"post","link":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/add-blank-wordpress-shortcode\/","title":{"rendered":"How To Add A Blank WordPress Shortcode"},"content":{"rendered":"\n
Sometimes when you're building a site you know you're going to add particular functionality later, but you don't want to delay launching the site while you build that functionality.<\/p>\n\n\n\n
You know exactly where it needs to go, and you're going to use a shortcode to hook it in, but you don't want to leave the shortcode sitting out there.<\/p>\n\n\n\n
The solution is to build it as you would if the shortcode was available and add a blank shortcode.<\/p>\n\n\n\n
The code is as follows:<\/p>\n\n\n\n
add_shortcode( 'iw_custom_cta', 'display_iw_custom_cta' );\nfunction display_iw_custom_cta() {\n return '';\n}<\/code><\/pre>\n\n\n\nLet's dive into what's going on.<\/p>\n\n\n\n
How it works<\/h2>\n\n\n\n
If you add a shortcode in the usual way, you'd add a WordPress shortcode block.<\/p>\n\n\n\n