I am having trouble figuring out how to change styles for the WP Bootstrap Starter theme. I've created a functions file with the following:

function my_theme_enqueue_styles() {

    $parent_style = 'parent-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.

    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array( $parent_style ),
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );

I can change some parts of the theme css like blog post title font size. But I cannot change the sub header font size where it says "Wordpress + Bootstrap". I've tried:

#page-sub-header {
    font-size: 1rem;

That should have done it, but it doesn't do anything. Driving me crazy.

Anyone have any ideas?

Here's the example site: https://afterimagedesigns.com/wp-bootstrap-starter/

  • 1
    Try inspecting the element from the console window, that should give you a clue whether or not the #page-sub-header { font-size: 1rem; } style is effective. – John Zenith Jan 9 at 21:30
  • Building on John's comment, more than likely you need to be more specific with your selectors to override the existing styles. looking at what rule the current font size is coming should help you with that. – mrben522 Jan 9 at 21:32
  • That's where I got the #page-sub-header from, the console view, and using chromes preview feature, I can change the font size around and it works. But when I try to add the css to my child theme styles sheet, it doesn't work. – everapt Jan 9 at 21:35
  • @mrben522 I copied the exact selector from chrome which allowed me to change the font around in the preview mode, and that didn't work either – everapt Jan 9 at 21:37
  • do you see your rule in the inspector but being overridden? – mrben522 Jan 9 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.