Shortcode executing in Edit Page screen on Save
-
I am currently working on a plugin that uses a shortcode to pull in a list of posts with the custom post type of “fan_fiction” (which is the same as the shortcode slug).
My problem is that when I type the shortcode [fan_fiction] in the Edit Page window and then hit publish, it renders the code in the edit window rather than just saving the shortcode. Considering that the function for the shortcode is running a custom wp_query loop, executing the shortcode on the Edit Page screen is a problem.
You can view the code for the shortcode function https://pastebin.com/Hb5vMRPS.
I can’t for the life of me understand what is causing it to execute the shortcode on the backend. There are no other active plugins. The theme I am using this on is Twenty-Eleven with WP 3.4.1.
I have Googled this and searched the WP Forums. No mention of this happening to anyone else.
Please help!
- The topic ‘Shortcode executing in Edit Page screen on Save’ is closed to new replies.