Hi @18anna06,
my guess is that the plugin has problems identifying which post is being rated because the shortcode is added in the template not directly in the post. To verify this please add a shortcode like this [ratemypost id=”365″] and let me know if it works in this case.
PS: Change id in the shortcode if necessary.
Regards,
Blaz
Hi @blazk ,
thanks for your reply, but unfortunately it did not work. We also changed the id in the shortcode.
Do you have any other idea?
Best regards,
Anna
Hi Anna,
it’s hard to say without seeing the website. If you share a link with me, I can check it out.
PS: Maybe it would be also good to ask Elementor developers what’s the procedure to embed a shortcode in a template. I’m unfortunately not that familiar with Elementor.
Blaz
-
This reply was modified 4 years, 8 months ago by
Blaz K..
I checked and it seems that the plugin has trouble identifying which post is being rated because the widget is added to the template. Therefore, it assumes that the template is being rated. As for the error, it appears because get_the_id in your case returns a string instead of an integer.
In this case it would be best to ask the Elementor team what is the proper way to embed a shortcode that is post specific within their system. I’ll check out Elementor soon, but right now I unfortunately don’t have a solution as I never worked with Elementor.
Blaz
Hi @blazk ,
thank you for your explanation. I solved that problem with the following steps:
1. Create ACF Field
2. Set [ratemypost] as default
3. Add value of ACF field as dynamic content to a text field in the template
Best regards,
Anna
Hi Anna,
thank you very much for sharing this with me. I added the steps in the documentation.
Regards,
Blaz