All ‘auto’ shortcodes work only inside the post content (well, inside the valid loop), they need to be able to detect the current post. If you want to embed it into some other location, you need to provide post ID. Check out the new Shortcode Builder to get shortcodes, and generate normal single rating shortcode and provide post type and post ID.
Shortcode ‘_auto’ does that automatically when inside the loop. If you work with PHP, global $post; should contain the current post, but it depends on your code. You should consult WordPress documentation about this.
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Shortcode in custom field + display on sidebar’ is closed to new replies.