Setting the styles on any custom post type’s post content block makes those styles apply to the post editor as well. Unfortunately this doesn’t appear to be working for the default post type for some reason.
Step-by-step reproduction instructions:
- Open the Themer, create a template for Single item: Post
- Edit the template and set styles on the Post Content block
- Edit a post using the post editor and notice the styles aren’t applied
This works perfectly with custom post types.
There are no unique console errors between the custom post type and the default post type.
Checking the css that is loaded on the page, the custom styles applied to the post content are not loaded at all on the default post editor, so it is not a specificity/override issue.
- WordPress version: 6.1.1
- Gutenberg Plugin version: -
- Cwicly Plugin version: 188.8.131.52.6.1
- Cwicly Theme version: 1.0.3
Thanks for the report.
Unfortunately, I’m not able to reproduce this error on my side, as can be seen here: https://app.instawp.io/wordpress-auto-login?site=%242y%2410%24LgKNQJJjverbfhNy1cvcUukOCLOZu2WfRxrO6w0ixC9n4G1u7gPU. → Hello world!
Is the correct template applying to the post you’re trying to edit?
Thank you for looking into this.
For some reason that instawp link doesn’t load anything for me either. It must be one of those days!
I will see if I can replicate the issue in a new wp instance and will let you know.
On the front-end it displays correctly, yes.
On the back-end global styles are being applied to the editor, but not the post content styles.
On a new instance, it works perfectly, on both custom post types and default.
It is not clear what is causing it to fail on the client site, as the steps to set it up were identical, we are doing some more investigating.
@Louis, we duplicated, reset and recreated the post template and the problem still persists on the client site.
So far there are no significant clues to help isolate the cause.
@Louis, if there is anything you can suggest to help us narrow this down, we will be grateful, as apart from recreating the whole site piece by piece until we find what is preventing it from working, there is no clear path forward from our side.
Perhaps the fact that the styles do not load at all in the editor can give you a clue?
Sorry for not getting back to you on this one.
That is unusual indeed.
Would it be possible for me to take a quick look at this on the (client) live installation or not?
If not, I’m wondering if there is some kind of issue with calling the template content in some way… A network view in the browser console might lead to an error?
@Louis, this is still occurring for us. Can you give us any guidance on how to isolate the cause?
Thank you @Louis, we will send over details as soon as possible.
@StrangeTech are you using a class on the Post Content element to set the styling? I’ve noticed that it doesn’t apply in the editor if it is.
No, what is confusing is, it works perfectly with a custom post type in the same site using the identical configuration. What is also confusing is, on a clean site using the same configuration for the default post type it works perfectly also.
Basically, something is interfering with this specific site and preventing the styles from being loaded in the editor only for the default post type and we haven’t been able to isolate it or replicate it on another site.
Hi @Louis, from testing, I can confirm this is now fixed for us. Nicely done!
Thank you very much for the feedback, I’m glad we finally got to the bottom of this.
If you do run into any issues, I’d be grateful if you could let me know.