• Resolved mativve

    (@mativve)


    Hey, I’m writing to ask if there is an option to add voting for photo galleries in a post? If so, in what way?

    Regards
    Matt

Viewing 1 replies (of 1 total)
  • Plugin Author Daniele Alessandra

    (@danielealessandra)

    Thank you for reaching out! Yes, the plugin does support adding Reactions to any type of content, including attachments. It automatically integrates Reactions in contexts where it’s easy to determine the specific content being viewed, such as at the end of an article or a page.

    To add the widget in other locations, you have two flexible options:

    • You can use a Gutenberg block, allowing you to choose the type of content and the ID. This block should be inserted below each image in your gallery and I don’t know if it is possible in your case (I dont’ know what you are using for galleries).
    • Alternatively, you can use a shortcode. If you have access to your template’s code, you can locate where the image gallery is displayed and add something like this:
    do_shortcode( '[reactions id="' . $attachment_id . '" type="attachment"]');

    In this example, we assume that the variable $attachment_id exists and contains the image ID.

    Using this method, votes for individual images will be preserved, just as if the Reaction were added from the Single Attachment page.

Viewing 1 replies (of 1 total)
  • The topic ‘Add voting for images in gallery’ is closed to new replies.