[Resolved] Layouts CSS and Javascript editor

This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Our next available supporter will answer your ticket in about 7.20 hours from now. Thank you for your understanding.

This topic contains 2 replies, has 2 voices, and was last updated by  siddardha thammana 2 months, 1 week ago. The support staff assigned to this topic is Nigel.

Viewing 3 posts - 1 through 3 (of 3 total)
Author
Posts
#565943

The css and java script added through this editor places the code on all of the front end.

How about a way to add layout specific css and javascript? This would help increase the page load speed.

I saw a couple of plugins that could do that. How ever, it would be easier if the plugin itself has this functionality

Thanks

#566374

Nigel
Forum moderator

Supporter languages: English (English ) Spanish (Espa├▒ol )

Supporter Timezone: Europe/London (GMT+00:00)

Hi Siddardha

You are right, custom CSS and JS added by Layouts is enqueued on *all* pages.

I have forwarded a feature request to the developers to be able to add CSS or JS on a per-Layout basis, so that custom JS would only be added to posts of a certain post type, for example. I can't say how long it would take to implement, I'm afraid, it depends very much on the other priorities of and demands on the Layouts team.

A minor performance improvement should be included in the next release which means the custom CSS file will not be enqueued if there is no custom CSS added.

Thanks for bringing this up.

#568742

Glad that this is taken into consideration.

Viewing 3 posts - 1 through 3 (of 3 total)