[wp-trac] [WordPress Trac] #9171: Shortcodes not outputting correctly

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 18 23:12:51 GMT 2009


#9171: Shortcodes not outputting correctly
--------------------------+-------------------------------------------------
 Reporter:  ridesign      |       Owner:  anonymous 
     Type:  defect (bug)  |      Status:  new       
 Priority:  high          |   Milestone:  2.7.2     
Component:  General       |     Version:  2.7       
 Severity:  normal        |    Keywords:  shortcodes
--------------------------+-------------------------------------------------
 When using the below shortcodes function, the post id does not output
 where the shortcode is typed in the post page. The post id is displayed
 right at the start of the post section.

 function shortcode_id() {
   the_ID();
 }
 add_shortcode('id', 'shortcode_id');

 What outputs on the post page:
 10741This is a good post. This is Post ID:

 What is typed in the post page:
 This is a good post. This is Post ID:[id]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/9171>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list