Title: [Plugin: Rating] Sorry. Where do I embed the code?
Last modified: August 20, 2016

---

# [Plugin: Rating] Sorry. Where do I embed the code?

 *  [Slideit](https://wordpress.org/support/users/slideit/)
 * (@slideit)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-rating-sorry-where-do-i-embed-the-code/)
 * I have just stared with WordPress and have never had to do hard coding. This 
   is my single.php. Where would I embed the code?
 * <?php echo five_star_rating_func(‘star’);
 *     ```
       <?php get_header(); ?>
       	<div class="outer" id="contentwrap">
       			<div class="postcont">
       				<div id="content">
       					<?php if (have_posts()) : ?>
       						<?php while (have_posts()) : the_post(); ?>
       						<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
       							<h2 class="title"><?php the_title(); ?></h2>
       							<div class="postdate"><img src="<?php bloginfo('template_url'); ?>/images/date.png" /> <?php the_time('F jS, Y') ?> <img src="<?php bloginfo('template_url'); ?>/images/user.png" /> <?php the_author() ?> <?php if (current_user_can('edit_post', $post->ID)) { ?> <img src="<?php bloginfo('template_url'); ?>/images/edit.png" /> <?php edit_post_link('Edit', '', ''); } ?></div>
   
       							<div class="entry">
       <?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) { the_post_thumbnail(array(300,225), array("class" => "alignleft post_thumbnail")); } ?>
       								<?php the_content('Read the rest of this entry &raquo;'); ?>
       								<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
       							</div>
       							<div class="postmeta"><img src="<?php bloginfo('template_url'); ?>/images/folder.png" /> Posted in <?php the_category(', ') ?> <?php if(get_the_tags()) { ?> <img src="<?php bloginfo('template_url'); ?>/images/tag.png" /> <?php  the_tags('Tags: ', ', '); } ?></div>
   
       							<div class="navigation clearfix">
       								<div class="alignleft"><?php previous_post_link('&laquo; %link') ?></div>
       								<div class="alignright"><?php next_post_link('%link &raquo;') ?></div>
       							</div>
   
       							<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
       								// Both Comments and Pings are open ?>
       								You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(); ?>" rel="trackback">trackback</a> from your own site.
   
       							<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
       								// Only Pings are Open ?>
       								Responses are currently closed, but you can <a href="<?php trackback_url(); ?> " rel="trackback">trackback</a> from your own site.
   
       							<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
       								// Comments are open, Pings are not ?>
       								You can skip to the end and leave a response. Pinging is currently not allowed.
   
       							<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
       								// Neither Comments, nor Pings are open ?>
       								Both comments and pings are currently closed.
   
       							<?php } edit_post_link('Edit this entry','','.'); ?>
       						</div><!--/post-<?php the_ID(); ?>-->
   
       				<?php comments_template(); ?>
   
       				<?php endwhile; ?>
   
       				<?php endif; ?>
       			</div>
       			</div>
       		<?php get_sidebars(); ?>
       	</div>
       <?php get_footer(); ?>
       ```
   
 * Thanks
 * [http://wordpress.org/extend/plugins/rating/](http://wordpress.org/extend/plugins/rating/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [couponforless](https://wordpress.org/support/users/couponforless/)
 * (@couponforless)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-rating-sorry-where-do-i-embed-the-code/#post-2987878)
 * Try putting it after <?php the_content(‘Read the rest of this entry »’); ?>
 * I use a similar plugin as seen on [http://couponforless.com](http://couponforless.com)
   works a treat let me know if that works
 *  Thread Starter [Slideit](https://wordpress.org/support/users/slideit/)
 * (@slideit)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-rating-sorry-where-do-i-embed-the-code/#post-2987906)
 * When using [rating] I have no problem in a post, but I tried that and I get.
   
   Fatal error: Call to undefined function five_star_rating_func() in C:\Wamp\www\
   wordpress\wp-content\themes\Election2012\single.php on line 14 Thanks PS I see
   it’s working good on your site.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Rating] Sorry. Where do I embed the code?’ is closed to new 
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/rating_f2e7c5.svg)
 * [Rating](https://wordpress.org/plugins/rating/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/rating/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/rating/)
 * [Active Topics](https://wordpress.org/support/plugin/rating/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rating/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rating/reviews/)

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [embed](https://wordpress.org/support/topic-tag/embed/)

 * 2 replies
 * 2 participants
 * Last reply from: [Slideit](https://wordpress.org/support/users/slideit/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-rating-sorry-where-do-i-embed-the-code/#post-2987906)
 * Status: not resolved