WordPress – I created a child theme, but it looks different because of Bootstrap
I wanted to create a child WordPress theme. All online tutorials were as simple as create two files and add several lines of code:
- https://developer.wordpress.org/themes/advanced-topics/child-themes/
- https://www.hostinger.com/tutorials/how-to-create-wordpress-child-theme
- https://premium.wpmudev.org/blog/how-to-create-wordpress-child-theme
To my surprise – it didn’t work. To be more specific, it almost worked, but the child theme did not look exactly the same as the parent – some margins, fonts and colors were different. After several experiments, it became apparent that these problems were caused by Bootstrap being loaded after the parent’s style.css
file.
Let’s see what exactly is happening to the parent and child stylesheets.
…