Title: Like counter inside a query loop block
Last modified: March 2, 2024

---

# Like counter inside a query loop block

 *  Resolved [Xaifu](https://wordpress.org/support/users/xaifu/)
 * (@xaifu)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/like-counter-inside-a-query-loop-block/)
 * Hello
 * This plugin is wonderful. I have been looking for days for something similar 
   and your plugin has amazed me for the simplicity and ease of use.
 * I am trying to display the likes button inside a Gutenberg query loop block by
   using the shortcode [oacsspl post_id] which as I understood reading the online
   documentation shows the likes counter of the current post.
 * For this I am using Generate Press and Generate Blocks. In the help forum of 
   Generate Blocks, they indicate this way to execute a shortcode inside its own
   Query Block: [https://generate.support/topic/shortcode-inside-gb-query-loop/#post-15556](https://generate.support/topic/shortcode-inside-gb-query-loop/#post-15556)
 * With the above snippet I have managed to execute correctly other shortcodes, 
   but however, it does not work using the shortcode [oacsspl post_id] nor the shortcode[
   oacsspl post_id=256] that should show the likes counter of my post ID: 256.
 * My question is am I trying to do something that is going to be incompatible with
   the way the Solid Post Likes plugin works?
 * What is the correct way to display the likes counter in a query loop?
 * Thanks for the help
   Daniel

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [Carl](https://wordpress.org/support/users/carlbtmn/)
 * (@carlbtmn)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/like-counter-inside-a-query-loop-block/#post-16896402)
 * I’m also trying to use the shortcode in a query loop without success. In my case,
   nothing shows up at all.
 * Any thoughts?
 * Thank you.
 *  Plugin Author [oacstudio](https://wordpress.org/support/users/oacstudio/)
 * (@oacstudio)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/like-counter-inside-a-query-loop-block/#post-16920453)
 * Hi [@xaifu](https://wordpress.org/support/users/xaifu/), [@carlbtmn](https://wordpress.org/support/users/carlbtmn/)
 * Thank you for the detailed explanation. I think this is something we have not
   considered yet.
 * I just tried using `do_shortcode('[oacsspl post_id=2327]');` and I end up with
   an empty output as well.
    We are pretty slammed this week, but we will work on
   this next week.
 * Kind regards,
 *  Plugin Author [oacstudio](https://wordpress.org/support/users/oacstudio/)
 * (@oacstudio)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/like-counter-inside-a-query-loop-block/#post-16936310)
 * Hi [@xaifu](https://wordpress.org/support/users/xaifu/),
 * Thanks for being patient while we checked on this.
    In our initial design we 
   omitted output outside of single page templates deliberately. That is why you
   get null output outside pages / posts.
 * However we understand that this may be required.
    We will add an option to the
   plugin that allows to toggle display in archive templates which should also make
   it available in query loops.
 * Kind regards,
 *  Thread Starter [Xaifu](https://wordpress.org/support/users/xaifu/)
 * (@xaifu)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/like-counter-inside-a-query-loop-block/#post-16936552)
 * Thanks for the explanation!
 * I will find that option very useful when it becomes available. I look forward
   to it being added to the plugin.
 * Regards
 *  Plugin Author [oacstudio](https://wordpress.org/support/users/oacstudio/)
 * (@oacstudio)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/like-counter-inside-a-query-loop-block/#post-17032960)
 * Hi [@xaifu](https://wordpress.org/support/users/xaifu/),
 * Thanks for being patient.
    Could you give this pre-release a whirl and see if
   that works for you:
 * [https://a.cl.ly/v1un11mY](https://a.cl.ly/v1un11mY)
 * There is a new setting available “Enable Post Likes in Loop” which should make
   it possible for you to use likes in custom query loops.
 * Kind regards,
 *  Thread Starter [Xaifu](https://wordpress.org/support/users/xaifu/)
 * (@xaifu)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/like-counter-inside-a-query-loop-block/#post-17036218)
 * Hello [@oacstudio](https://wordpress.org/support/users/oacstudio/)
 * Thanks for the fix. In my case, I was using Generate Blocks to create the custom
   query loop and it worked perfectly.
 * Best regards
 *  Plugin Author [oacstudio](https://wordpress.org/support/users/oacstudio/)
 * (@oacstudio)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/like-counter-inside-a-query-loop-block/#post-17036253)
 * Hi [@xaifu](https://wordpress.org/support/users/xaifu/),
 * >  Thanks for the fix. In my case, I was using Generate Blocks to create the 
   > custom query loop and it worked perfectly.
 * Thank you for the feedback!
 * PS: We can always use a rating if you can. All the best.
 *  [Carl](https://wordpress.org/support/users/carlbtmn/)
 * (@carlbtmn)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/like-counter-inside-a-query-loop-block/#post-17036723)
 * Hey [@oacstudio](https://wordpress.org/support/users/oacstudio/),
 * In this case [@xaifu](https://wordpress.org/support/users/xaifu/) is not using
   the out of the box query loop block. Something is missing in your plugin to actually
   grab the post ID individually.
 *  Plugin Author [oacstudio](https://wordpress.org/support/users/oacstudio/)
 * (@oacstudio)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/like-counter-inside-a-query-loop-block/#post-17039192)
 * Hi [@carlbtmn](https://wordpress.org/support/users/carlbtmn/)
 * When you say “out of the box query loop block” – do you mean [https://wordpress.org/documentation/article/query-loop-block/](https://wordpress.org/documentation/article/query-loop-block/)?
 * If yes, then it would make sense that it is not working. There is no Block Editor
   support yet.
 * Kind regards,
 *  [Carl](https://wordpress.org/support/users/carlbtmn/)
 * (@carlbtmn)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/like-counter-inside-a-query-loop-block/#post-17039588)
 * Yes. All this time I’ve been talking about the query loop block. The plugin needs
   to take advantage of all this new features in WordPress.
 *  Plugin Author [oacstudio](https://wordpress.org/support/users/oacstudio/)
 * (@oacstudio)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/like-counter-inside-a-query-loop-block/#post-17040589)
 * > Yes. All this time I’ve been talking about the query loop block. The plugin
   needs to take advantage of all this new features in WordPress.
 * Gotcha. I am afraid support for the Block Editor is currently no priority for
   us. If the Solid Post Likes plugin grows in installations we will consider it.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Like counter inside a query loop block’ is closed to new replies.

 * ![](https://ps.w.org/solid-post-likes/assets/icon-256x256.png?rev=3124455)
 * [Solid Post Likes](https://wordpress.org/plugins/solid-post-likes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/solid-post-likes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/solid-post-likes/)
 * [Active Topics](https://wordpress.org/support/plugin/solid-post-likes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/solid-post-likes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/solid-post-likes/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [oacstudio](https://wordpress.org/support/users/oacstudio/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/like-counter-inside-a-query-loop-block/#post-17040589)
 * Status: resolved