torozov
Forum Replies Created
-
Forum: Plugins
In reply to: [Spectra - WordPress Gutenberg Blocks] Post Grid paginationSubmitted.
Forum: Reviews
In reply to: [Ultimate Blocks - WordPress Blocks Plugin] Like it a lot!Looking forward for the update!
Forum: Reviews
In reply to: [Ultimate Blocks - WordPress Blocks Plugin] Like it a lot!Hello,
I’m talking about Button(Improved). I can remove it if I edit the button as HTML but
it breaks the button – “This block contains unexpected or invalid content.” If you can add it as checkbox will be great.Thanks in advance
- This reply was modified 6 years, 1 month ago by torozov.
Forum: Plugins
In reply to: [WP-PostRatings] Average rating in categoryI see. Anyway thank you for your responses and for your great plugin!
Forum: Plugins
In reply to: [WP-PostRatings] Average rating in categoryI’m not sure if my comment is very clear. I will give an example:
I have average rating for a category 4.5. I just want to show the right number of stars which are corresponding to that value. I don’t want anything else. Just based on numeric value to display right sequence of 5 star images. Something like
<?php the_ratings( ‘4.5’ ); ?> which will output just 5 images
rating_on.png rating_on.png rating_on.png rating_on.png rating_halfForum: Plugins
In reply to: [WP-PostRatings] Average rating in categoryI was able to “create” the following code:
<?php $args = array( 'numberposts' => -1, // all the posts 'post_type' => 'post', 'category' => $cat, 'meta_key' => 'ratings_average', 'meta_value' => null, 'meta_compare' => '!=' ); $posts = get_posts( $args ); $votes = 0; $post_count = count($posts); $rating = 0; $average = 0; foreach( $posts as $post ) { $single = get_post_meta( $post->ID, 'ratings_average', true ); $rating += $single; } foreach( $posts as $post ) { $single = get_post_meta( $post->ID, 'ratings_users', true ); $votes += $single; } $average = $rating / $post_count; echo 'Average rating for the category:<br />'; echo round($average, 2); echo '<br />'; echo 'Number of votes:<br />'; echo $votes; ?>
Basically it gathers all average ratings for the posts in certain category, number of total votes for all posts and number of posts which have ratings.
Then to calculate the average rating for the category we devide the sum of all average ratings by the number of posts which have ratings. I think it’s a some kind of a solution since the plugin doesn’t have the ability to rate a category. So my question is:
How to add starts to that rating? Is there something like a shortcode or snippet in the plugin if you input a value and the output is that value converted in stars ??
Forum: Plugins
In reply to: [WP-PostRatings] How to rate a category?+1 for ability to rate categories!
Thank you very much!!!
I’ve edited the code so users won’t be able to vote on homepage and categories:<div class="kk-star-ratings '.($disabled || (is_home() && parent::get_options('kksr_disable_in_archives')) || (is_category() && parent::get_options('kksr_disable_in_archives')) ? 'disabled ' : ' ').$pos.($pos=='top-right'||$pos=='bottom-right' ? ' rgt' : ' lft').'" data-id="'.$id.'">
Forum: Plugins
In reply to: [kk Star Ratings - Rate Post & Collect User Feedbacks] Is there a Shortcode?There’s a help section in the admin panel of the plugin.
<?php if(function_exists(“kk_star_ratings”)) : echo kk_star_ratings($pid); endif; ?>I was looking for the same.
Thanks in advance!Forum: Fixing WordPress
In reply to: Post styleI’m using this to show the posts on the homepage:
<?php query_posts($query_string.'&posts_per_page=16'); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="POST"> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"> <img src="https://site.com/<?php the_title(); ?>.png" width="200px" height="150px" alt="<?php the_title(); ?> image" /> </a> </div> <?php endwhile; ?> <?php else : ?> <h2 class='center'>No posts found</h2> <?php endif; ?>
The problem is that each post is with class POST and I need some way to put different class on first or last post on each row.
Forum: Plugins
In reply to: Which Plugin Do I Have To Use For Flash Game SiteUse https://www.kimili.com/plugins/kml_flashembed I am using it on Luigi Games