• Resolved gggreggg

    (@gggreggg)


    I’ve tried various additions to my child theme style.css in an attempt to remove some of the white space above the Title.

    For examples

    .entry-title {
        padding-top: 1px;
    }
    
    .singular .hentry {
        padding: 0;
    }

    These entries don’t have any impact. What seems odd is that when I use Firebug to look at those css lines, they aren’t changed even though I’ve refreshed the page.

    My current styles.css is:

    /*
     Theme Name:   WP Child Theme
     Theme URI:    http://biotoxinjourney.com/
     Description:  My BioToxinJourney Twenty Eleven Child Theme
     Author:       GGGreggg
     Author URI:   http://biotoxinjourney.com/
     Template:     twentyeleven
     Version:      1.0.0
     License:      GNU General Public License v2 or later
     License URI:  http://www.gnu.org/licenses/gpl-2.0.html
     Text Domain:  twenty-eleven-child
    */
    
    /* remove white space above page title */
    .entry-title {
        padding-top: 1px; // padding-top: 15px;
    }
    .singular .hentry {
        padding: 0;
    }
    
    /* hide "previous" and "next" links at bottom of posts/pages */
    #nav-single {
    	display: none;
    }
    
    /* hide "This entry was posted in..." at bottom of posts/pages */
    .entry-meta {
    	display: none;
    }

    Any suggestions?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    Can you please provie us your site url?

    Since you use a child theme you have to follow the following format:
    ————————
    Theme Name: Your_child_Theme_name
    Description: Whatever description
    Author: Any name
    Author URI: http://……
    Template: your_theme_name
    */

    @import url(“../your_theme_name/style.css”);
    ——————————-
    To ensure that your custom css code operates, do not put it into child css style. Put in into your custom css box of your theme settings.

    I hope it helps.

    Thread Starter gggreggg

    (@gggreggg)

    glgeorgiou,

    Thanks for looking at this. I’d included the parent style.css in my child theme functions.php per https://codex.wordpress.org/Child_Themes – see my functions.php below. I think the child theme style.css is getting loaded because other tweaks to my child theme style.css are having effect.

    Thanks.

    <?php

    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );

    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );

    }

    ?>

    Thread Starter gggreggg

    (@gggreggg)

    Hmmm, I think I found the problem. On the page I mentioned, https://codex.wordpress.org/Child_Themes, they talked about the possibility of the child style.css not loading.

    I replaced this functions.php code:

    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );

    }

    with this functions.php code:

    function theme_enqueue_styles() {

    $parent_style = ‘parent-style’;

    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’, ‘theme_enqueue_styles’ );

    Now my child style.css lines are working.

    Thanks for the help!

    Glad for help 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can't Remove White Space Above Title’ is closed to new replies.