• Resolved Xaifu

    (@xaifu)


    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

    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)
  • 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

    (@oacstudio)

    Hi @xaifu, @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

    (@oacstudio)

    Hi @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

    (@xaifu)

    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

    (@oacstudio)

    Hi @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

    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

    (@xaifu)

    Hello @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

    (@oacstudio)

    Hi @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.

    Hey @oacstudio,

    In this case @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

    (@oacstudio)

    Hi @carlbtmn

    When you say “out of the box query loop block” – do you mean https://www.ads-software.com/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,

    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

    (@oacstudio)

    > 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.