Geginner - I want to show the output of a php file at another location of my sit

Hello,

I’m working with wordpress and managed to do a lot by my own. Now I have a little problem and don’t get it right and hopefully someone can give me an advise.

I use a plugin that shows ratings and reviews of members on their profile page. Now I want to show these rating stars on another page of my site. http://i.imgur.com/Fy1pyk7.png

I have the php file and code where these rating stars are coded but don’t know what part of code I can copy and pst it into the other file. Would be great if someone can have a look on it!

As the code was too long it’s here: http://pastebin.com/JHjz0xvP

Thanks for your help!!

Well, since this is a plugin, it will be very hard to sort out what you need to do to show it elsewhere in your site.

You might want to look at the plugin’s site’s blog for an answer… But, a quick review of the code shows this
area to be the place it displays the stars:
[php]
if ($check_content_loop[0]->Average != “”) {
$check_show_star_loop = $check_content_loop[0]->Average;
$demss = 0;
echo ’ ';
for ($dem = 1; $dem < 6; $dem++) {
if ($dem <= $check_show_star_loop) {
echo ‘1 star’;
} else {
$demss++;
if (ceil($check_show_star_loop) - $check_show_star_loop > 0 and $demss == 1) {
echo ‘1 star’;
} else {
echo ‘1 star’;
}
}
}
[/php]
And, this line is where it located the value:
$check_show_star_loop = $check_content_loop[0]->Average;
This loop takes the value and displays 1 to six stars of either full-star, half-star or empty-star depending on it’s
value. It is a simple loop and is common on the net. Not sure if this helps, but, it should get you started…
I think the issue is where it gets the $check_content_loop[0] to pull the average count from… This code may
even work as-is. Not knowing your plugin fully, can’t guess…

Sponsor our Newsletter | Privacy Policy | Terms of Service