Title: Function in theme problem
Last modified: August 21, 2016

---

# Function in theme problem

 *  Resolved [Ђорђе Марчетин](https://wordpress.org/support/users/marcetin/)
 * (@marcetin)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/function-in-theme-problem/)
 * Hello,
    I have try to implement rating in theme with display_rating_result() 
   and display_rating_form() but it do not work, I get this error:
 * Warning: Missing argument 1 for display_rating_result(), called in /path to my
   theme files/page.php on line 387 and defined in /public_html/wp-content/plugins/
   multi-rating/shortcodes.php on line 82
 * Warning: Missing argument 1 for display_rating_form(), called in /path to my 
   theme files/page.php on line 390 and defined in /public_html/wp-content/plugins/
   multi-rating/shortcodes.php on line 8
 * I must note that plugin works when “Rating results display” or “Rating form display”(
   after/before title/content) is selected from settings.
 * [http://wordpress.org/plugins/multi-rating/](http://wordpress.org/plugins/multi-rating/)

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

 *  Plugin Author [dpowney](https://wordpress.org/support/users/dpowney/)
 * (@dpowney)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/function-in-theme-problem/#post-4240691)
 * Hi. I think you need to make sure you call the functions in the loop, or pass
   the post id as a parameter
 * Daniel
 *  Plugin Author [dpowney](https://wordpress.org/support/users/dpowney/)
 * (@dpowney)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/function-in-theme-problem/#post-4240725)
 * Marked as resolved
 *  [pfosenbauer](https://wordpress.org/support/users/pfosenbauer/)
 * (@pfosenbauer)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/function-in-theme-problem/#post-4240737)
 * I’m getting the same error from Buddypress groups:
 * Warning: Missing argument 1 for display_rating_result(), called in /home/content/
   41/10028041/html/finishlinz/wp-content/themes/frisco-for-buddypress/groups/single/
   home.php on line 74 and defined in /home/content/41/10028041/html/finishlinz/
   wp-content/plugins/multi-rating/shortcodes.php on line 82
    No ratings yet Warning:
   Missing argument 1 for display_rating_form(), called in /home/content/41/10028041/
   html/finishlinz/wp-content/themes/frisco-for-buddypress/groups/single/home.php
   on line 76 and defined in /home/content/41/10028041/html/finishlinz/wp-content/
   plugins/multi-rating/shortcodes.php on line 8
 *  Plugin Author [dpowney](https://wordpress.org/support/users/dpowney/)
 * (@dpowney)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/function-in-theme-problem/#post-4240738)
 * BuddyPress has not been tested. I’ve made some defect fixes today which should
   fix this problem for the warning.
 *  [pfosenbauer](https://wordpress.org/support/users/pfosenbauer/)
 * (@pfosenbauer)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/function-in-theme-problem/#post-4240739)
 * Thank you.
    Right now I’m trying to make it work in Buddypress Groups Extras,
   in the file display_gpages_content.php. The markup is:
 * >  <?php setup_postdata($page); ?>
   > <div class=”gpage”>
   >  <?php the_content(); ?>
   >  <?php echo do_shortcode(“[displayRatingResult]”);?
   > > <?php echo do_shortcode(“[displayRatingForm] “); ?> <?php bpge_the_gpage_edit_link(
   > $page->ID); ?>
   > </div>
 * ,so there is no WP loop.
    All I need to figure out how to pass the page ID parameter
   on the shortcode. Thanks again for that awesome plugin and hope you can help 
   me. Peter
 *  Plugin Author [dpowney](https://wordpress.org/support/users/dpowney/)
 * (@dpowney)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/function-in-theme-problem/#post-4240740)
 * Hi,
 * I’ve added some instructions in the faq on the wp plugin page for how to do this.
   I recommend calling the function directly i.e. display_rating_result(array(‘post_id’
   => $page->ID));
 * Cheers
 *  Plugin Author [dpowney](https://wordpress.org/support/users/dpowney/)
 * (@dpowney)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/function-in-theme-problem/#post-4240741)
 * The shortcode would be echo do_shortcode(‘[displayRatingResult post_id=’ . $page-
   >ID. ‘]’);

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

The topic ‘Function in theme problem’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/multi-rating_d6dfe6.svg)
 * [Multi Rating](https://wordpress.org/plugins/multi-rating/)
 * [Support Threads](https://wordpress.org/support/plugin/multi-rating/)
 * [Active Topics](https://wordpress.org/support/plugin/multi-rating/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multi-rating/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multi-rating/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [dpowney](https://wordpress.org/support/users/dpowney/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/function-in-theme-problem/#post-4240741)
 * Status: resolved