Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
Chrizze
tagDiv Member

Ok, yes. I suspected this might of been the case, so I went ahead and wrote my own code for this purpose.
It’s a bit of a dirty hack, but it works. I’ll figure something out down the road…

I’ll attach the code here, if anyone else wants to do the same. I run this function with the td_review_key, it then returns the correct amount of stars. (rounded up). It all lives inside a regular div with the review class and the same classes that the author review uses. Looks neat, now I only need to make customer review work the same. πŸ˜€

<?php
function setRating($number = 5) {
// Make it integer:
$stars = round( $number * 2, 0, PHP_ROUND_HALF_UP);

// Add full stars:
$i = 1;
while ($i <= $stars - 1) {
echo '<i class="td-icon-star"></i>';
$i += 2;
}
// Add half star if needed:
if ( $stars & 1 ) echo '<i class="td-icon-star-half"></i>';
}
?>

Chrizze
tagDiv Member

Ok, sorry for being a bit unclear. It’s difficult to explain in detail..
But here goes another try at it. πŸ™‚


<div class="rating">
<span class="stars"><? What function should I put here? ?></span>
<span class="result_scoreKey"><?php setRating(get_post_meta($post->ID, 'td_review_key', true)); ?></span>
</div>

I have a small box, the right side shows the actual rating in numbers, the left side is where I want the stars to show up.

I can see that the stars use a class called td-icon-star. But I don’t know what function to call to render the stars in my custom page. Is there a hook? Or how do I show the actual stars?

Thanx for all the help! πŸ™‚

Chrizze
tagDiv Member

@Simion C. You misunderstand. I think the built review is great! But it is geared towards the author, not the visitors. There’s always two sides of the review, mine as author, and visitor as reader.

The built in review should stay, but could be a bit refined with extra features for me as author (like rating templates, so I don’t have to enter my options in all my posts).

There’s two plugins on WordPress that is worthy of mentioning, Site Reviews and Comment Rating Field Plugin. I’ve integrated the latter into my sites comment system, adjusted the CSS, so now I have Author rating and Visitors rating.

Many customers/readers are looking for both the authors, and the existing customers reviews when shopping online.

So, the existing review should stay…just need some extra features. πŸ™‚

Chrizze
tagDiv Member

Never mind, I found the td_config.php and added the new template into the loop. Excelent stuff you guys made! Love it!

Chrizze
tagDiv Member

This is pretty much what I am doing as well, but I am adding customer reviews into a single post template.
How do I add a custom template to the list of available post templates?

I’ve made a copy of a loop-single, and saved it into the theme root as loop-single14.php and single-template14.php. But I can’t see where to add them into the list of available templates in a post.

Where do I add my custom post templates? πŸ™‚

Chrizze
tagDiv Member

In Chrome, press F12 for developers tool. You can also right click and choose “inspect element” on website to find the CSS-class for the main logo, (td-logo). Then upload your logo 2 times the size you want. IE if you want logo in 100px, upload in 200px.

Chrizze
tagDiv Member

The review system built in is a bit wonky to use, but I like it. It is focused towards author reviews, not customer reviews. The built-in review could use a extra TLC in the form of being able to create review-templates for example. Right now I must enter all the separate categories I review manually on every single post. Maybe it could have a set template that I can use on all posts?

In terms of visitor/customer reviews, there are plenty of plugins available. But it’s hard to use them in combination with the built-in review, as the built-in review ends up last in post. Maybe you could change it so I can decide wether I as author want the review showing first or last in post? Ideally it would be better if I were given a shortcode for it, so I have control over where it is supposed to show in my post/page.

In my project we require both author and visitor reviews, and currently we are using the built-in review for authors. But we have issues on where to put a visitor review in the frontend, since most plugins rely on shortcodes, the review for a visitor/customer ends up way above the authors review. This is not ideal.

The built-in review is not perfect, but it just needs some extra development time to be actually usable for me as an author. It works fine as a author only review, but we have no control over placement of it. It needs some settings to be available in the Themepanel, and really needs a shortcode to use in posts and pages.

I could buy and use a complete review system plugin, but since I already bought a theme where reviews exist, I don’t see why.

Please consdider these things in a update if possible. Pretty please. πŸ™‚

As a reference to what I think most people here think of when we say reviews, this plugin on WordPress.org covers most of it. https://wordpress.org/plugins/product-review/

  • This reply was modified 9 years by Chrizze. Reason: Found a plugin that explains the most common review model
Viewing 7 posts - 1 through 7 (of 7 total)