I have a wordpress site, and I need to apply custom styles to one page, I see the custom styles option, and some of them work, but others get overwritten. Is there a way I can apply strictly my own styles to a portion of the page?
Thanks,
Brian
I have a wordpress site, and I need to apply custom styles to one page, I see the custom styles option, and some of them work, but others get overwritten. Is there a way I can apply strictly my own styles to a portion of the page?
Thanks,
Brian
Add the following to add a custom style sheet (replace "custom-style.css" with a better style sheet name, and replace 'your-page-slug' with the slug of the page you wish to add the custom style to):
// script manager template for registering and enqueuing files
function childtheme_script_manager() {
// register custom style on your specific page
if (is_page('your-page-slug')) {
wp_register_style('custom-css', get_stylesheet_directory_uri() . '/custom-style.css');
wp_enqueue_style ('custom-css');
}
}
add_action('wp_enqueue_scripts', 'childtheme_script_manager');
Create a style sheet in your theme folder called custom-style.css. Add your custom styles. Write the css to target whatever it is on your page that needs specific styling. Without anymore information or posting example code on that page, it's impossible to answer that.