Title: clnjo's Replies | WordPress.org

---

# clnjo

  [  ](https://wordpress.org/support/users/clnjo/)

 *   [Profile](https://wordpress.org/support/users/clnjo/)
 *   [Topics Started](https://wordpress.org/support/users/clnjo/topics/)
 *   [Replies Created](https://wordpress.org/support/users/clnjo/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/clnjo/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/clnjo/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/clnjo/engagements/)
 *   [Favorites](https://wordpress.org/support/users/clnjo/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Solid Post Likes] Passing id trough shortcode](https://wordpress.org/support/topic/passing-id-trough-shortcode/)
 *  [clnjo](https://wordpress.org/support/users/clnjo/)
 * (@clnjo)
 * [4 years ago](https://wordpress.org/support/topic/passing-id-trough-shortcode/#post-15736645)
 * 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 4 years ago by [clnjo](https://wordpress.org/support/users/clnjo/).

Viewing 1 replies (of 1 total)