Shortcode return jumps outside div in wordpress
-
Problem is that the_ratigs() jumps outside <div id=”wpratings”>
function wpratings( $atts, $content = null ) { return '<div id="wpratings"><b>Rating: </b>' . the_ratings() . '</div>'; } add_shortcode("wpratings", "wpratings");
Shortcode output example:
5.00 <<< this is output of the_ratings() Here is the post content Rating: <<< this is place of <div id="wpratings">
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Shortcode return jumps outside div in wordpress’ is closed to new replies.