Tag Info

Hot answers tagged

4

just to add to what Rarst answered, you can create Custom Post Type not to emulate Comments but as stub posts with no ui. then to every Author on your site add a custom user metadata that will hold a post id of your newly made post type (one per each author) and in your author template before you call the comment loop\form set the global $post to that post ...


3

Yes, there is a plugin - GD Star Ratings. I am using it here: http://apluginforthat.com/gd-star-ratings/. You can customize your questions, type of ratings (thumbs up/down vs stars) and much more. You can also configure it to have the ratings appear in your dashboard.


3

For any rating functionality I always turn to GD Star Rating by Milan Petrovic. This plugin can do SO many things, including thumb rating, rating of comments, multiple ratings, etc. It can also handle Rich Snippets (for getting your star ratings shown in Google SERPs), caching mechanisms, etc.. In short, it can do a lot, and I generally use it because of ...


3

I would not take visits into account: To get these numbers you have to connect to an external table, or worse write into the WordPress tables on each request. Use comments, that is built-in. Here is a sample code that adjusts itself to your comment development: add_filter( 'the_content', 'wpse_78513_hotness' ); function wpse_78513_hotness( $content ) { ...


2

You just need to add a static <option> element before you start your loop. <select style="width: 100px" name="games_database_rating"> <option value="none">No Rating</option> <?php // Generate all items of drop-down list for ( $rating = 10; $rating >= 1; $rating -- ) { ?> <option value="<?php echo ...


2

My solution to this question would be to add a custom field / metabox to all of your posts where you can select a desired rating from a drop down menu. I would also then add the internal rating that you assign to post within the posts list screen so you can see at a glance each posts rating instead of having to click "edit" to see whether a post has a ...


2

Here's something I'd use if I want to do that without using plugins Create a custom field as rating and provide the value while doing post. Suppose I gave a rating of 6, Now wordpress save it into the database as. meta_key => rating meta_value => 6 Now to show the rating on post I'll use this code into single.php or index.php but make sure to put it ...


2

The reason you have a problem is 0 is also considered equal to false, when the get_post_meta call returns false, it's also the same as being equal to 0. if( !get_post_meta( $post_id, 'some-non-existant-field', true ) == 0 ) Would be the same as ... if( get_post_meta( $post_id, 'some-existing-field', true ) == 0 ) ..the only difference is in one case ...


2

To extand Marc Duncans (a.k.a. @t31os) answer: You multiple ways to question "if ( $some_val_A IS $some_val_B )". There is a difference between equal and identical. $real_world_ex = get_post_meta( $post_id, 'ratings_users', true ); // Example: test this in your functions.php function wpse26016_test_vars( $real_world_ex = '' ) { $some_int = (int) 1; ...


2

try GD star rating and look into the options and tweak it to be displayed only on specific pages in the settings page of GD star rating there is the following : Auto insert rating code: For individual posts. For individual pages. For posts displayed in Archives. For posts displayed on Front Page. For posts displayed on Search results make sure ...


1

Yep, mechanics of comments in WP are tightly tied to posts. Which things like archives aren't. Your options are: Associate comments with fake hidden posts/pages. Use external comment system that doesn't care about WP mechanics (not something I would recommend, but it works for some people). Create and use Custom Post Type that will emulate comments.


1

I've used GD Star Rating in the past. It works well. By default the ratings for posts and pages are turned on but you can disable this. You can also change the images that display for the thumb up/down easily http://wordpress.org/extend/plugins/gd-star-rating/


1

Based on your clarification, I would recommend something like the following: <?php $rating = get_post_meta( $post_id, 'ratings_users', true ); if ( '0' < $rating ) { the_ratings(); } ?> Alternately, you could use: <?php $rating = get_post_meta( $post_id, 'ratings_users', true ); if ( '' != $rating && '0' != $rating ) { ...


1

Try one of these plugins: GD Star Rating WP Voting or if you don't mind spending a little then: Post Voting Plugin


1

Custom field will do the task. On the post page there's nothing to do great, just create a Custom Field called agerating or age-rating. Authors will enter the value of the field according to their content with G/PG/R/X. Then at the frontend, edit single.php. Use this code inside the loop to retrieve the rating value: <?php $age-rating = ...


1

You are already doing what you need to do, but in another context. $value = get_post_meta($post->ID, 'rating', true); Take that value and format it for display. Edit: I installed your whole block of code. You are storing you key, not your ratings value. You need to access that $ratings array again to pull the value. $ratings = array( 1 => ' ...


1

Plugin : Rate This is nice and lightweight rating plugin that enables commenters to give rating to post while commenting. And the average of all comment rating is then used to give overall rating to the post. You can use the comment system as notes. So commenter (fans) can leave a note as comment and also give the rating to post (player)


1

it seems like a custom or a modified plugin at the very most its named smash-commentratings on the site you mentioned and the closest plugin to that one is this one named comment rating but if you want to use a rating plugin i will advice gd star ratting which offers not only the comment thumb rating but many more type that can also be used in posts.


1

there are varaiables in gd rating to sort query. you can use in URL like : http://www.gdstarrating.com/?gdsr_sort=rating&gdsr_order=desc http://www.gdstarrating.com/?gdsr_sort=review&gdsr_order=desc http://www.gdstarrating.com/category/tutorials/?gdsr_sort=votes&gdsr_order=asc or pass to a query query_posts("gdsr_sort=rating"); ...


1

i wrote this plugin a while back for a client and never got around to polishing it off for general release. https://github.com/dwenaus/bp-rate-vote-like-anything Myself and another developer plan to launch it soon. But even as it is now, it's totally solid and very cleanly coded. I wrote it because GD Star Rating plugin was so bloated. Basically it ...


1

I would create a custom table that stored a) the user doing the rating b) the user being rated c) the rating d) the time of the rating. Between these 4, you should be able to store, aggregate, and effectively query your data with very little overhead or PHP processing. update note: this is pseudocode function get_user_rating( $user_id ) { $rating = ...


1

You could use PollDaddy ratings and just display it to logged in editors, authors, etc. <?php if ( current_user_can( 'manage_options' ) { echo polldaddy_get_rating_html(); } ?> And if you want to do that only on the admin side you'll want to create a meta box to display on the post edit screen which you can learn how to do here: ...


1

Most of the times when someone uses the words "Wordpress" and "community" together the answer is Buddypress. Regarding your requirements I would say: social media login, user panel can be handled well by plugins, but content rating, output content based on ratings sounds like something that has to be custom-coded. But this also depends on what ...


1

I have been working on this myself with very little coding experience. So far I have found that you can add in another value but you need to update a few of the files in the woocommerce template. In the single-product-reviews.php, just repeat the code from the <p> to </p>. See where I have added in the newrating star select if ( ...


1

See the function link_advanced_meta_box() in wp-admin/includes/meta-boxes.php: <td><select name="link_rating" id="link_rating" size="1"> <?php for ( $r = 0; $r <= 10; $r++ ) { echo '<option value="' . $r . '"'; if ( isset($link->link_rating) && $link->link_rating == $r ) echo ' ...


1

From what you've mentioned, this could be done by adding a new field to the user_meta on the back end. Then, you could use an approach similar to what's documented here for front end editing by users: How to edit a user profile on the front end?



Only top voted, non community-wiki answers of a minimum length are eligible