Skip Navigation

[Resolved] Clean front end

This support ticket is created 7 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 4 replies, has 2 voices.

Last updated by Bart Gybels 7 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#397492

I am trying to: css the front-end

Our front end developer starts always from an empty css en javascript-files.

How can i delete all the starter theme css and starter theme js-files from the header/footer?

#397643

Nigel
Supporter

Languages: English (English ) Spanish (Español )

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

The CSS and JavaScript on the front end of your site is provided by your theme and possibly by your plugins.

Your theme's PHP template files which are used by WordPress to generate the HTML for your pages are tightly linked to your CSS files because, for example, they will dictate the classes that are added to the HTML elements that your stylesheets use to determine your site layout and style the contents. Some of those classes are added by your theme, some directly by WordPress, but in any case it is not very meaningful to say you would start a project with no CSS or JS.

It sounds as if your developer may not be familiar with WordPress. Unless they are going to code the entire theme (including the PHP templates) from scratch, then they will need to use a theme as a starting point and build upon the existing stylesheets.

You can use Toolset with any WordPress standards-compliant theme. The only proviso is, if you are going to use the Layouts component you will need to either use a theme for which there is an existing Layouts integration plugin available (see: https://toolset.com/documentation/user-guides/how-to-use-toolset-theme-integrations/) or modify a theme yourself using our guidelines (https://toolset.com/documentation/user-guides/develop-layouts-based-themes/)

You or your designer may find this external tutorial useful about the correct way to add scripts or stylesheets to your site: http://code.tutsplus.com/articles/how-to-include-javascript-and-css-in-your-wordpress-themes-and-plugins--wp-24321

#399156

We are using the starter theme from wp-types.

But in that theme there is some default css and js for columns and responsive.

He makes his CSS from scratch without all the css and js that's not being used.

How can he do that?

#399426

Nigel
Supporter

Languages: English (English ) Spanish (Español )

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

First, a disclaimer of sorts: It is advisable to build on top of the existing stylesheets and scripts rather than removing them and starting from scratch, and we won't be able to provide support for the custom work your developer does if they have problems.

If you are using Layouts it is a requirement that you use a 12-column grid system (as in the included Bootstrap, for example).

Adding or removing styles and scripts is via the standard WordPress methods.

You should not make changes directly to Toolset Starter theme files, but to the child theme instead which is available from the same downloads page. See the WordPress codex for more information: https://codex.wordpress.org/Child_Themes

You can add the code required to remove the stylesheets and scripts added by the parent theme in the functions.php file of your child theme. You can see in the functions.php file of the parent theme which stylesheets and scripts are enqueued (added), and you can dequeue them (remove them) using wp_dequeue_script or wp_dequeue_style (see https://codex.wordpress.org/Function_Reference/wp_dequeue_script and https://codex.wordpress.org/Function_Reference/wp_dequeue_style).

I would only recommend that your developer embark on this if they are familiar with WordPress development, as this is custom work which we can't provide support for.

#403744

/

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.