I am using a child theme of "freestore". (https://en-gb.wordpress.org/themes/freestore/)
I am attempting to add some content to one of my pages using simple HTML and CSS. I've managed to successfully change CSS styles in the theme via the style.css, however I am trying to add my own HTML and then CSS to style it.
I have created the page 'home' and through the wordpress tinymce text editor I can add my HTML fine. When I try to add the CSS via my style.css, it doesn't apply the styles. I can however add the styles inline, but I would like to add the styles externally.
Example:
On the wordpress text editor I would add the line:
<div id="cssTest">TEXT</div>
In my style.css file I would add:
#cssTest {
background-color: red;
}
The CSS style is not applied. However adding the following to the HTML editor will work fine:
<div id="cssTest" style="background-color: red;">TEXT</div>
My question is either:
- How can I apply my styles via an external stylesheet?
- Should I be creating my own template for that page and adding the HTML there?
check if child themes style.css has
Text Domain: freestore-child
parentthemename-child. Any css id/class element you add would be implemented.Best way would be to create custom.css file and enque it in your child theme's functions.php via
wp_enqueue_style
function.I believe it's best practice to create page template for specific pages like home.