Hi,
I’ve met the same problem where I wanted to use the class SolidPostLikesPublic in a page calling other posts and I wanted to display the button but for some posts.
I was able to do it with a little modification in the function oacs_spl_display_like_button in views/SolidPostLikesPublic.php where the $post_id is actually taken in account in the 2 lines concerned if defined.
Like this :
if ($is_comment == 1) {
$post_id = ! empty( $post_id ) ? $post_id : get_comment_ID();
} else {
$post_id = ! empty( $post_id ) ? $post_id : get_the_ID();
}
What claudien wants I think is to be able to do so in the shortcode with a parameter
like so : [oacsspl id=13] where then the function is calling oacs_spl_display_like_shortcode to take into account this id and do :
echo wp_kses_post($this->oacs_spl_display_like_button($post_id, 0)); and finally fall back to my code in order to display the like buttton for this post id.
-
This reply was modified 2 years, 5 months ago by clnjo.