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

WordPress Trac wp-trac at lists.automattic.com
Thu Feb 19 00:42:35 GMT 2009

#9171: Shortcodes not outputting correctly
 Reporter:  ridesign               |        Owner:  anonymous
     Type:  defect (bug)           |       Status:  closed   
 Priority:  high                   |    Milestone:           
Component:  General                |      Version:  2.7      
 Severity:  normal                 |   Resolution:  invalid  
 Keywords:  shortcode, shortcodes  |  
Changes (by jamescollins):

  * status:  new => closed
  * resolution:  => invalid
  * milestone:  2.7.2 =>


 Your shortcode_id)() function is supposed to return a string of content,
 rather than echo'ing out the content directly.

 the_ID() echo's the ID.

 In your case your shortcode_id() should probably return get_the_ID()

 See http://codex.wordpress.org/Shortcode_API for more information.

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

More information about the wp-trac mailing list