Site logo

Archived topic

Shortcode not rendered in posts list

9 replies · Started by Luca on March 15, 2016

Viewing posts 1–10 of 10

Hello,
I added a shortcode from Reviewer Plugin in a post, the shortcode basically creates an image with the reviewer rating showed as number of stars.
The shortcode works properly when opening the post and from different posts however the rating is not loaded when not in the post, so for example clicking the category/tag, there is no image generated from the shortcode in the list of posts of that category/tag. I can provide screenshots to better explain.

Shortcode example
[rwp-reviewer-rating-stars id="0" post="..."] replace ... with the post ID

The support of Reviewer plugin checked as well and advised to contact you.

Thank you in advance.

Luca

In "Customize > Blog > Blog Content" is your content set to display full posts or excerpts?

If it's set to excerpt, it won't display any HTML, including shortcodes.

There is some code we can add to show full posts only in one category if you're interested.

Let me know :)

Hi Tom,

Thank you for your reply.
The setting is only excerpt, but I see that even if I change to full post the shortcode doesn't work

it would be very useful to have the image rating showed at the start of the excerpt, any workaround?
No thanks I am not interested in having the full posts only in one or some category, excerpt is better :)

Does the shortcode work inside the regular post? I'm not sure why it wouldn't work in your blog posts on the blog.

The blog uses the same function to display content as regular pages and single posts: the_content()

Hi Tom,

Yes the shortcode works inside the post.
I can use it in a post or recall the rating of a review even from another post, no issues with that.

When the is a list of posts like when listing by category or tag rating is not showed.

Luca

Can you link me to the plugin so I can do some tests with it?

Hmm, perhaps you can ask the developer what the theme should be doing to display their shortcode?

The content is being served through the_content() function like every other post and page, so I'm not sure what else a theme can do to ensure shortcodes are working correctly.

Hi Tom,

The dev of the plugin couldn't find any issue, he suggested to try another shortcode from other plugins to isolate the issue and I did.
I created a couple of posts and inserted as a content only the shortcodes from two plugins
Plugin "Auto Terms of Service and Privacy Policy", shortcode [my_privacy_policy]
Plugin "WP Sitemap Page" shortcode [wp_sitemap_page only="post"]

both shortcodes only insert some html code and both plugins are not processed in the excerpt
Can this help in any way?

Shortcodes won't be processed in excerpts, but if your blog content setting is set to "Show full post", they should work perfectly.

This archived topic is closed to new replies.