Tell us what you are trying to do?
Remove tces-js-style-to-head & tces-js-style-encoded embedded scripts from View. I've read elsewhere that these have something to do with blocks styling but I have no block styling on these items that needs to show in the view.
Is there any documentation that you are following?
No
Is there a similar example that we can see?
Line 1056: view-source:hidden link
What is the link to your site?
hidden link
Hello,
Yes, you are right, they are inline CSS style codes in base64 encoded format, I have checked HTML source codes of the URL you mentioned above, there isn't any "tces-js-style-to-head", but I see two results with "tces-js-style-encoded".
It is for style the view's result in grid layout, I don't think it is a good idea to remove them from view block, and it might conducts unexpected results.
You can add a feature request for it:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
Our developers will evaluate it
As a workaround, you can design the view with classic editor, for example:
1) Dashboard-> Toolset-> Settings-> General
in section "Editing experience", enable option "Show both the legacy and Blocks interface and let me choose which to use for each item I build".
2) Dashboard-> Toolset-> Views, create the post view with classic editor, and test again.
Hi, I never build views with the blocks editor. It's too limited, so this view is already in classic. Is there another workaround to get all of this unnecessary text of the page? We are trying to reach a certain text to HTML ratio (for Google Page Speed) and these long strings are hurting our efforts.
-Thanks!
Those scripts/CSS codes are outputted only from blocks editor, If you are using blocks editor to design the content template, please try to switch to classic editor, and test again.
If you need more assistance for it, please provide a test site with same problem, I need to test and debug it in a live website.
Thanks for the details, I have done below modifications in your website, edit both post views:
hidden link
hidden link
In section "Loop Editor", change the content template shortcode from:
[wpv-post-body view_template="xxxx" ]
To:
[wpv-post-body view_template="xxxx" suppress_filters="true"]
Please test again, check if it is fixed, thanks
More help:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-body
suppress_filters (opt):
'true' | 'false' (default)
If suppress_filters=’true’, all third party (non WordPress) filters hooked into the_content filter will be removed, when retrieving the post body.
Ok, that worked. Thank you!