• Resolved xan3ver

    (@xan3ver)


    I have a child theme activated. I was trying a couple of different things, because it did not seem as though my child theme was working correctly. I have now changed something that has made a few of the styling that I have added, to not work.eg:

    My main menu is not centered anymore, this is what I have in my stylesheet:

    *Centre main menu
    */
    .main-navigation ul.nav-menu,
    .main-navigation div.nav-menu > ul {
    text-align: center;
    }

    My header image and a few of the images in my sidebar has a border again:

    /*Remove border around header image
    */
    .entry-content img, .comment-content img, .widget img, img.header-image, .author-avatar img, img.wp-post-image {
    border-radius: none !important;
    box-shadow: none !important;
    }

    The padding below the main nav bar has increased again:

    /*Remove padding under menu
    */

    .site-header {
    padding-bottom: 0;
    }

    Proudly powered by wordpress is visible again:

    /*Hide ‘proudly powered by wordpress
    */
    a[title=’Semantic Personal Publishing Platform’] { display: none; }

    And quite a couple of other things…. I think that I have set my child theme up wrong. Please help! This is how my the code at the top of my child style.css:

    /*
    Theme Name: twentytwelvechild
    Author: the WordPress team
    Author URI: https://wordpress.org/
    Template: twentytwelve
    Version: 1.7
    License: GNU General Public License v2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    Tags: light, gray, white, one-column, two-columns, right-sidebar, fluid-layout, responsive-layout, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
    Text Domain: twentytwelve
    */

Viewing 15 replies - 1 through 15 (of 35 total)
  • Thread Starter xan3ver

    (@xan3ver)

    and website: hooplahappiness.com

    did you enqueue the parent style in functions.php in your child theme ?

    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' );
    Thread Starter xan3ver

    (@xan3ver)

    I did, but I might have to much in there? There is too much info for what to add there… here is everything that I have in my functions.php:

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

    }

    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’ );

    <?php
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/rtl.css’ );
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/editor-style.css’ );
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/editor-style-rtl.css’ );
    }
    ?>

    What should I change/remove?

    sorry I didn’t see the link to your site. You just wanting the menu to be centered.

    try adding this rule to center the menu

    ul#menu-menu-1{
    text-align:center !important;

    }

    Thread Starter xan3ver

    (@xan3ver)

    No, that is not the only thing. I had all the above (and more) working on my site, then I changed something in my functions and/or child style that made it not work. Nothing that I have in my child style works anymore (and it did work previously!)

    I’m confused in your the code you submitted your child theme is name twentytwelvechild. But, When I look at your code for your site it says the child theme name is hoopla which is a child of twentytwelve.

    These appear to be 2 different themes altogether.

    Thread Starter xan3ver

    (@xan3ver)

    Hmmm, now I’m confused, because I removed the hoopla name/folder. Where is the code for my site? Hoopla isnt in my ftp or in my themes in my wordpress dashboard>>

    What theme does it show selected under your dashboard ?

    here is the line that shows up when I display your source code.

    <link rel="stylesheet" id="twentytwelve-style-css" href="http://hooplahappiness.com/wp-content/themes/hoopla/style.css?ver=4.2.2" type="text/css" media="all">

    maybe it been cached.

    Thread Starter xan3ver

    (@xan3ver)

    twentytwelvechild

    I only have two themes showing in my dashboard of which the other is the twentytwelve theme. But I have twentytwelvechild selected/activated.

    Are you using in plugins to cache your site ?

    Thread Starter xan3ver

    (@xan3ver)

    Ok, I see! Where/In what file is that line located. I can update that then!

    Thread Starter xan3ver

    (@xan3ver)

    Yes, I am using WP Fastest Cache

    I would try clearing the cache and see if it takes care of it.

    Thread Starter xan3ver

    (@xan3ver)

    Icleared the cache, but nothing changed. I did notice, when in my dashboard, this code from my functions.php appears on two lines at the top:

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }
    
    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' );
Viewing 15 replies - 1 through 15 (of 35 total)

The topic ‘Child Theme problems’ is closed to new replies.