Hi!
Thanks for the review!
Actually you can’t do that without modify some PHP code. Maybe in a next release, I’ll prepare that.
But, the shortcode will work if you are in a WP loop.
To be sure, during our dev, you can white something like this beside the shortcode <?php the_ID(); ?>. If the displayed post ID is ok, the buttons will be ok.
I need more time to test the plugin with Essential Grid by Themepunch.
Thanks for fast response. Actually your plugin works perfectly in the normal world. I -a man with no php- just thought there could be an easy way to accomplish that.
For now I don’t know how to implement this php code.
Anyway, I will be waiting with hope.
You can try this, but if it does not work the first time, I advise you to wait for the next release:
In the plugin file public/class-kodex-posts-likes-public.php, you can replace the entire function shortcode_buttons by this code:
public function shortcode_buttons($atts){
$a = shortcode_atts(array('postid' => get_the_ID()), $atts);
$post_id = $a['postid'];
$post_type = get_post_type($post_id);
$html = '';
if(in_array($post_type, $this->get_option('post_types'))){
$html .= '<div class="kodex_buttons" style="text-align:'.$this->get_option('alignement').';">';
$html .= $this->buttons($post_id);
$html .= '</div>';
}
return $html;
}
After this change, the shortcode could take a postid attribute, like this: [kodex_post_like_buttons postid="1234"]
🙂 🙂
HIP HIP HIP, HOORAY…
I bow my head in front of you Pierre. Marvelous – Splendid – Greatest – Fastest support almost at no time.
Thank you really much.
/*** For Those Who Are Looking For The Same Issue ***/
1- I did the fix above,
2- Added the shortcode above to the content of the post with the correct ID of the post (can be seen in URL box of the browser),
3- In the skin editor of the Essential Grid plugin, added a text/html layer and set it as post-content under the source tab.
/*** End ***/
Have a nice life, Pierre.
Hi. The changes I have made you make are now integrated in the plugin Version 2.2.
Great.
By the way, I’d like you to keep in mind that I can help in Turkish localisation not this plugin but in any of your other projects if you need.
Hello Pierre,
I used your plugin for my site. It works well. Good job on this little jewel!
Now I wonder if I can give my users a freedom to vote once per day. As of now plugin allows to vote only once.
Thank you!
Hi @redworker.
Actually, this plugin conception does not allow single user vote per day, and I think it will never be the case, unfortunatelly.
Thank you to use this plugin anyway