• Resolved deetz32

    (@deetz32)


    I created a child theme that has a style.css file and functions.php file. When I activate the child theme I am presented with 2 sidebar menus (one that activates the menu and one that act only as a link)

    I tried to follow the directions provided here:
    http://codex.wordpress.org/Child_Themes

    The coding is as follows for style.css:

    /*
     Theme Name:   Bushwick Child
     Description:  Bushwick Child Theme
     Template:     bushwick
     Text Domain:  bushwick-child
    */
    
    /* =Theme customization starts here
    -------------------------------------------------------------- */

    And as follows for functions.php:

    <?php
    
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' );
    function enqueue_parent_theme_style() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }

    Any idea why there is a double up?

    Thanks

Viewing 13 replies - 1 through 13 (of 13 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Are you able to provide a link to your site so I can take a look directly?

    As a temporary test, try removing functions.php and adding this to your stylesheet, to make sure your child theme is activated correctly:

    @import url("../bushwick/style.css");

    Moderator Kathryn Presner

    (@zoonini)

    This is the functions.php child theme method that works for me:

    <?php
    function bushwick_child_enqueue_child() {
    	wp_register_style( 'bushwick', get_template_directory_uri() . '/style.css' );
    	wp_enqueue_style( 'bushwick-child', get_stylesheet_uri(), array( 'bushwick' ) );
    }
    add_action( 'wp_enqueue_scripts', 'bushwick_child_enqueue_child' );

    I think the code you used was just example code, not referencing a real theme folder.

    Thread Starter deetz32

    (@deetz32)

    Thanks for your help.

    I’ve tried changing the code to that suggested in your more recent post, and it seems to be doing the same thing. I’m not sure why there are 2 menu bars showing up.

    Please take a look when you have a chance:

    http://gameofdrams.com/

    Thanks

    Moderator Kathryn Presner

    (@zoonini)

    Looks like you may have two stylesheets in your child theme – could you navigate via FTP and remove the one you don’t need?

    Thread Starter deetz32

    (@deetz32)

    When I enter the chile-theme folder, there are only 2 files:
    – functions.php
    – style.css

    I can’t seem to find a second style.css.

    When I inspect the website using Chrome’s inspector, I’ve noticed that the two menu links have different code associated in the css. Could this be the cause of the double-up?

    Thanks

    Thread Starter deetz32

    (@deetz32)

    Additionally, I have the following css in my stylesheet of the child theme in order to change the colours (could this be causing the double-up?):

    .navigation-main .current_page_item > a,
    .navigation-main .current-menu-item > a {
    	color: #421b0a;
    }
    
    .menu-toggle,
    .navigation-main .widget-handle {
    	color: #9e231c;
    	display: block;
    	float: right;
    	width: 1.3rem;
    }
    
    .menu-toggle:before:hover,
    .toggled .menu-toggle,
    .navigation-main .widget-handle:hover:before,
    .navigation-main .widget-handle.open:before {
    	color: #E59502;
    }
    Moderator Kathryn Presner

    (@zoonini)

    Hi there – looks like your site is now private so I’m not able to look further. Would it be possible to create a zip file of your child theme, upload it somewhere, and link to it here so I can take a look?

    Hi, sorry to bring up an old post.

    I had the same problem too using the basic template for creating the child theme. Upon inspecting on chrome:
    .menu-toggle {display:none;}
    is being overwritten by
    .genericon {display:inline-block;}
    caused by this line within navigation.php
    <h1 class="menu-toggle genericon"></h1>

    I’m not sure what is the cause for this to happen only on the child theme, but as a temporary measure, copy the php file over to the child theme folder and remove the genericon class from that line so that the icon only appear once.

    Moderator Kathryn Presner

    (@zoonini)

    dogessence – could please start a new thread for your issue, thanks:

    https://wordpress.org/support/theme/bushwick#postform

    We’ve found a solution for the double-hamburger (menu toggle) issue in child themes using the stylesheet enqueuing method.

    In the last line of your function, add a priority 11 before the closing bracket, so if you had this before:

    add_action( 'wp_enqueue_scripts', 'bushwick_child_enqueue_child' );

    …change it to this:

    add_action( 'wp_enqueue_scripts', 'bushwick_child_enqueue_child', 11 );

    We’ve also implemented a fix within the theme itself so this won’t be necessary in the future. It will be in the next version of the theme.

    Let me know if adding 11 works for everyone.

    Hi, I’m not sure if I can still ask question on this thread any more but can you help me with the two side bar showing up on my site Thanks! http://www.pamperurselfgreen.com

    here’s what I put in functions.php

    <?php
    function weaver_xtreme_child_enqueue_child() {
    wp_register_style( ‘weaver-xtreme’, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘weaver-xtreme-child’, get_stylesheet_uri(), array( ‘weaver-xtreme’ ) );
    }
    add_action( ‘wp_enqueue_scripts’, ‘weaver_xtreme_child_enqueue_child’,11 );}

    ?>

    and in the style.css

    /*
    Theme Name: weaver-xtreme-child
    Template: weaver-xtreme
    Theme URI: //weavertheme.com
    Description: Bare minimum Weaver Xtreme Child demo theme
    Author: Bruce Wampler
    Author URI: //weavertheme.com/about
    Version: 1.0
    Tags: light, dark, white, black, gray, one-column, two-columns, three-columns, left-sidebar, right-sidebar, fixed-layout, fluid-layout, responsive-layout, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, full-width-template, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, photoblogging
    Template: weaver-xtreme

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program. If not, see <http://www.gnu.org/licenses/&gt;.

    About style.css:

    Traditionally, a child theme provides its own style.css to override or extend the
    parent style.css. This usually involved adding an “@import” to the child’s style.css.

    Weaver Xtreme handles the main style sheet differently. It is called “assets/css/style.weaverx.css”,
    and is loaded before the theme “style.css” file. Thus, there is no need to “@import” the
    parent stylesheet.

    So you can make overrides and extensions directly in this child style.css.

    */

    /* ——————————————————
    Add specific style overrides here…

    Just for example, this style will change the default BG Color for the site.
    */
    body,
    input,
    textarea {
    background-color: #CCC;
    }

    Moderator Kathryn Presner

    (@zoonini)

    Hi pamperurselfgreen – this forum is for help with the Bushwick theme. Since you’re running Weaver Xtreme you can get help in their forum here:
    https://wordpress.org/support/theme/weaver-xtreme

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Child Theme Has Two Sidebar Menus’ is closed to new replies.