Child themes: how to override css, js and fonts from parent theme?
-
Hi… I’m rly new in WP. I was using Joomla for 5 yrs and sadly I came to the conclussion that the joomla team is going to the wrong direction in this growing industry. So, I’m migrating all my current projects to WP.
I’m surprissed by the strong and flexible ecosystem in this cms. Reading the themes tutorials I find out that the easiest way to learn is using child-themes. So I chose to use a child theme from the “twentytwelve” theme (“twentytwelve-child”)
But this theme include by default css, js and fonts. And I want to include only: google library jquery, bootstrap js, bootstrap css, and ubuntu font from google font, nothing else. and all this stuff from the child directory.
I tried by writing the calls directly in the header.php. OK, works, but the js and css from the parent still loading…
The codex say that it have relation with the functions.php, but I don’t understand the use of this file.
I repeat the function where the js is called in parent functions.php. But this give fatal php error (cannot redeclare). When I use function_exist this give me error too. It isn’t very clear where to use these override, and the tutorials doesn’t seem to much comprensive for me…
So: what I have to do to override correctly the functions.php of a child-theme to block/replace all js, css and fonts of parent theme?
Very thanks for your attention.
- The topic ‘Child themes: how to override css, js and fonts from parent theme?’ is closed to new replies.