Json source code displayed instead of rendered web post
-
After saving the post and publishing it using WP and its vanilla templates, we test for a site visit with some links sent to an email recipient. The link redirects the user to a page that is somewhat backend, with post content displaying in json format. This happens from time to time, with no clear way of reproducing the issue.

The blog I need help with is: (visible only to logged in users)
-
Does the link in the email redirect you to a URL like this:
https://cuttothetake.com/wp-json/wp/v2/posts?slug=your-post-slug? Or is it simply the plain permalink of your post title, like this one:https://cuttothetake.com/review-food-for-profit/? -
Hi, I cannot reliably reproduce this problem but I saw the issue again and have the extended url saved.
https://cuttothetake.com/review-beetlejuice-beetlejuice/?utm_source=Cut+to+the+Take&utm_campaign=687d00d5fa-EMAIL_CAMPAIGN_2023_12_10_12_04_COPY_01&utm_medium=email&utm_term=0_-9154291388-%5BLIST_EMAIL_ID%5D&ct=t(EMAIL_CAMPAIGN_6_8_2024_14_44_COPY_01)Now, removing the excess part of the link, we have
https://cuttothetake.com/review-beetlejuice-beetlejuice/These two give the same results, where .json is shown in plain text rather than the rendered post, I have included the screenshot below. It seems that the issue keeps recurring whenever I send a newsletter through mailchimp with WP post linked, as you can see from the extended url above.

Hope this is informational. When this happens, I visit WP editor and click on the “save” button for the post that is displaying .json, after doing this for one post, all other posts are fixed for some reason. I hope to find answers as to why they break and prevent it from happening on my site again. Thanks.
-
It seems that the server cached the page. Adding the
?nocacheparameter at the end of the URL forced the page to load correctly, resolving the issue. This works by telling the browser or server not to use a cached version of the page.
Now would be a good time to clear both your site and server cache to prevent this from issue. You can follow this guide for clearing your site cache:
I hope this helps.
- The topic ‘Json source code displayed instead of rendered web post’ is closed to new replies.