[Plugin: Like Dislike Counter] What do you mean?
-
What do you mean. You need to add php lines manually.
Here are the Details for how to use.For Posts use the code in loop
<?php if(function_exists(‘like_counter_p’)) { like_counter_p(“text for like”); } ?>
In the body of the post? If, so. Too much work to be a good plugin.http://wordpress.org/extend/plugins/like-dislike-counter-for-posts-pages-and-comments/
-
Hi Slideit
We have tried to make the plugin less complicated. All you need to do is add those lines wherever you want the like dislike option to show up. And there are different code for like and dislike and some people would only like to show the like part or dislike part.
Yes its a bit of work but then it ads the option to include it anywhere you want it.
Let us know if you find any other issues. Also we have this other plugin which is pretty basic too.
http://wordpress.org/extend/plugins/simple-html-slider/
Also you can find more interesting plugins at
http://www.wpfruits.com/downloads/wp-plugins/
Thanks
RahulHi Rahul,
This is where I’m messed up.This plugin will not automatically added to your theme.
You need to add php lines manually.When you say that. Does it mean I have to add something to my theme and if, so where do I add the lines in my theme? I have been running a phpbb for years and have just started WordPress. Usually any hard coding is not recommended with phpbb. Is this what you are saying? To hard code my theme? Sorry. Like I say just started with WP.
ThanksHi
Whatever themes you may be using. There are page templates. Like you want to use the code on the single blog post. There is a file name single.php in your theme which is used to the show the single blog post. There must be a line saying where it says the_content(): that is used to show the content of the post. If you want to show the like: dislike under the content put those lines under it.
Let me know if that helps.
Or contact me at rahul at techinfini .com I will try to helpRegards
RahulSavarona: Single Post (single.php)
Where would I place your code, or would it go here at all?
<?php global $theme; get_header(); ?>
<div id="main">
<?php $theme->hook('main_before'); ?>
<div id="content">
<?php $theme->hook('content_before'); ?>
<?php
if (have_posts()) : while (have_posts()) : the_post();
/**
* Find the post formatting for the single post (full post view) in the post-single.php file
*/
get_template_part('post', 'single');
endwhile;else :
get_template_part('post', 'noresults');
endif;
?><?php $theme->hook('content_after'); ?>
</div><!-- #content -->
<?php get_sidebars(); ?>
<?php $theme->hook('main_after'); ?>
</div><!-- #main -->
<?php get_footer(); ?>
ThanksHi
You can use it just before the
<?php $theme->hook('content_after'); ?>
It will add the button just after the post content for you.
By the way what theme is that?
Thank
Thank you again Rahul,
Like I say I’m not a coder and do apprciate the help and I’m sure I’m not the only one out here trying to figure out how to add code to a theme.Is this how it should be with both lines of code? Do I use both lines, or one?
get_template_part(‘post’, ‘noresults’);
endif;
?><?php if(function_exists(‘like_counter_p’)) { like_counter_p(“text for like”); } ?>
<?php if(function_exists(‘dislike_counter_c’)) { dislike_counter_c(“text for dislike”); } ?><?php $theme->hook(‘content_after’); ?>
Link to Savarona
Hi
Yes that’s how you need to do it. First line will show only like and the second line will show only dislike. So if you want both of them. Put both the lines or if you want any one of them use that line respectively. 🙂
Thanks
I’m getting this error:
Parse error: syntax error, unexpected T_FOR in C:\Wamp\www\wordpress\wp-content\themes\Savarona\single.php on line 23
Call Stack
# Time Memory Function Location
1 0.0006 393480 {main}( ) ..\index.php:0
2 0.0009 397184 require( ‘C:\Wamp\www\wordpress\wp-blog-header.php’ ) ..\index.php:17
3 0.6445 24429728 require_once( ‘C:\Wamp\www\wordpress\wp-includes\template-loader.php’ ) ..\wp-blog-header.php:16Where did I go wrong?
ThanksHI
Did you download and install the latest version. Can you try the new plugin and check if it still gives you error??
ThanksI have version 1.0. Is that the newest?
ThanksPlease redownload it we have made some changes.
From your site, or here?
Never mind on the last. It brings me right back here and yes it’s the version 1.0 that I’m using.
ThanksHere is the single.php again after the edit:
<?php global $theme; get_header(); ?><div id=”main”>
<?php $theme->hook(‘main_before’); ?>
<div id=”content”>
<?php $theme->hook(‘content_before’); ?>
<?php
if (have_posts()) : while (have_posts()) : the_post();
/**
* Find the post formatting for the single post (full post view) in the post-single.php file
*/
get_template_part(‘post’, ‘single’);
endwhile;else :
get_template_part(‘post’, ‘noresults’);
endif;
?>
<?php if(function_exists(‘like_counter_p’)) { like_counter_p(“text for like”); } ?>
<?php if(function_exists(‘dislike_counter_c’)) { dislike_counter_c(“text for dislike”); } ?>
<?php $theme->hook(‘content_after’); ?></div><!– #content –>
<?php get_sidebars(); ?>
<?php $theme->hook(‘main_after’); ?>
</div><!– #main –>
<?php get_footer(); ?>
Does it look right?
ThanksI want you to download the plugin again and replace the files with the new one. I mean delete the plugin and then reinstall it.
And yes that should be the code.
You can contact me on skype at rahulbrilliant2004
- The topic ‘[Plugin: Like Dislike Counter] What do you mean?’ is closed to new replies.