Hi,
I use the "GD Star Rating" plugin with the AutoFocus 2.0.2 theme.
www.fridolinweiner.de
I don't use the rating options, but the preview option, so only I can rate a post.
Is there any way the stars appear:
a) on the sidebar next to the post after the title
b) on the frontage, if I hover the picture, just below the title on the picture (check out the HP if you don't understand what i mean by this...
c) on a archive page like on the post page just after the title?
Since I am a total WP dummy, I don't have any idea where to start...
Kannan C answers:
Did you tried using the function wp_gdsr_render_article() in your sidebar? As stated by gd rating, there is ratings sidebar widget for each post. Did you tried it?
unless if you have a specific reason to use gd rating, i recommend this plugin http://wordpress.org/extend/plugins/wp-postratings/
This will be simple for you as you are new to wordpress.
Fridolin Weiner comments:
Yes, I had this installed as well.
But it seems, everyone can vote.
My goal is not to let the users vote, but to "vote" myself and just let the user see.
In "rating options" - "Allow To Rate" I can choose between "Guests only", "Registered Users only" and "both"
it seems that I can't vote myself.
otherwise this tool would have been much better for me, I agree.
Fridolin Weiner comments:
Yes there are three widgets:
GD Blog Rating (shows how users voted the blog)
GD Star Rating (shows how users voted the post)
GD Comments Rating (shows how users voted the comments, i guess)
None of those shows how I rated the post.
Where would I put it in the sidebar?
<?php
/**
* The Sidebar containing the Singlular Sidebar widget areas.
*/
?>
<?php if ( is_active_sidebar( 'singlular-widget-area' ) ) : ?>
<aside id="singlular-sidebar" class="widget-area" role="complementary">
<ul class="xoxo">
<?php
if ( ! dynamic_sidebar( 'singlular-widget-area' ) ) : ?>
<?php dynamic_sidebar( 'singlular-widget-area' ); ?>
<?php endif; // end Singlular Widget Area ?>
</ul>
</aside><!-- #singlular-sidebar .widget-area -->
<?php endif; // end singlular sidebar check ?>
Shouldn't I put it in the single.php (single post)
<?php
/**
* The Template for displaying all single posts.
*/
get_header(); ?>
<div id="container">
<div id="content" role="main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php
// AutoFocus Nav Above (See: functions.php)
autofocus_nav_above();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
global $posts, $shortname;
// Grab The Blog Category
$af_blog_catid = of_get_option( $shortname . '_blog_cat');
$af_img_display = of_get_option($shortname . '_image_display');
$af_img_slider_count = get_post_meta($post->ID, 'slider_count_value', true);
// If this isn�t a blog post, show the AutoFocus Entry Image (See: functions.php)
if ( !in_category($af_blog_catid) )
af_single_entry_image($af_img_display, $af_img_slider_count);
?>
<header>
<h1 class="entry-title"><?php the_title(); ?></h1>
<wp_gdsr_render_article()>
<?php af_posted_on(); ?>
</header>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'autofocus' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<footer class="entry-utility">
<p class="entry-meta">
<?php af_post_meta(); ?>
<?php comments_popup_link( '<span class="comments-link">' . __( 'Leave a comment', 'autofocus' ) . '</span>', '<span class="comments-link">' . __( '1 Comment', 'autofocus' ) . '</span>', '<span class="comments-link">' . __( '% Comments', 'autofocus' ) . '</span>', '', '' ); ?>
<?php if ( get_post_meta($post->ID, 'enable_flickr', true) == FALSE && of_get_option($shortname . '_show_exif_data') == TRUE && has_post_thumbnail() && ( get_post_meta($post->ID, 'videoembed_value', true) == '' && get_post_meta($post->ID, 'show_gallery', true) == FALSE )) { ?>
<span class="exif-data"><a href="<?php echo af_exif_link(); ?>#exif-data" title="<?php echo esc_attr__( 'View EXIF data', 'autofocus' ) ?>"><?php _e('View EXIF Data', 'autofocus') ?></a>.</span>
<?php } ?>
<?php if ( get_post_meta($post->ID, 'enable_flickr', true) && get_post_meta($post->ID, 'flickr_link', true) ) { ?>
<span class="flickr-link"><?php _e('View ', 'autofocus'); ?><a href="<?php echo get_flickr_photo_set_link($post->ID); ?>" target="_blank" title="<?php echo esc_attr__( 'View Flickr set', 'autofocus' ) ?>"><?php _e('Flickr set', 'autofocus') ?></a>.</span>
<?php } ?>
<?php edit_post_link( __( 'Edit', 'autofocus' ), '<span class="edit-link">', '</span>' ); ?>
</p><!-- .entry-meta -->
<?php get_sidebar(); ?>
</footer><!-- .entry-utility -->
</article><!-- #post-## -->
<?php
// AutoFocus Nav Below (See: functions.php)
autofocus_nav_below(); ?>
<?php
// Only show the Comments Form if the post has comments open
if ( comments_open() || get_comments_number() != '0' ) {
comments_template( '', true );
}
?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_footer(); ?>
Kannan C comments:
ok. did you tried the sidebar widget? can you pm me the admin details, so i can check the theme(please do not post it publicly just pm me following the link in my username).
Fridolin Weiner comments:
Ok, got it.
I inserted it into the single.php just after the title.
Now it is there twice, once in the article, once in the sidebar. arghhh
[[LINK href="http://www.fridolinweiner.de/2011/12/game-of-thrones/"]]http://www.fridolinweiner.de/2011/12/game-of-thrones/[[/LINK]]
Kannan C comments:
ok, i am checking it.
Kannan C comments:
seems like, you are currently editing the theme in the same time?
Fridolin Weiner comments:
hm, yes, I will go to sleep now. So its all yours.
I managed to:
Set the stars on the sidebar (10 Stars Plain 16)
I didn't manage to:
Hide the stars in the post (but I can life with having the stars 2 times ones in the post, ones one the sidebar, so don't waste your energy on solving that one)
Set the stars on the archive pages...
Fridolin Weiner comments:
Just write me where you put the code in case I want to change anything, and consider the money yours ^^
Thank you very much!