Viewing 4 replies - 1 through 4 (of 4 total)
  • What changes did you make in the child theme?

    It’s really impossible to tell what is wrong just by looking at an image, I would have to examine the site while the child theme is active. I thought I might be able to tell what is wrong just by examining the child theme’s style.css file, but it appears that you’ve copied in the entire contents of the parent theme’s style.css file. All you need to do instead is enqueue the parent and child theme’s stylesheets in your child theme’s function.php file, then add just the new CSS or any overriding CSS to your child theme’s stylesheet. It makes your child theme’s stylesheet a lot cleaner, and easier to pick out the changes you’ve made.

    Thread Starter Deborah Delin

    (@deborahdelingmailcom)

    Thank you for replying!

    According to your suggestion I have created a new child theme style.css which only contains the CSS modifications. When I activate the Child theme it still displays wrongly.

    The site is mainly in Hebrew, an RTL language, so I went through style.css reversing the directions of text-align, float and clear. At present the parent style.css also contains these modifications, and it displays properly.

    I realise it is difficult to tell what is wrong by looking at an image, but obviously I don’t want to leave the messed up site live.

    Would it be possible to co-ordinate a time when I activate the child theme and you could have a look at it?

    Thank you so much for your help!

    Deborah

    Thread Starter Deborah Delin

    (@deborahdelingmailcom)

    Actually now the content bar is on the right in the child theme but there is an enormous page sized white space at the top of the web page.

    I am wondering if the problem is my child functions.php file.

    I upload a file with:

    <?php
    
    add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
    function enqueue_child_theme_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
        wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('parent-style')  );
    }

    It isn’t clear to me whether I need to close the code with ?> or not but whether I do or not, WordPress fills this file with 370 lines of code which starts off as below.

    Also when I load a child style.css file with this in it:

    /*
     Theme Name:   Twenty Fourteen Child
     Theme URI:    https://example.com/twenty-fourteen-child/
     Description:  Twenty Fourteen Child Theme
     Author:       Deborah Delin
     Author URI:   https://example.com
     Template:     twentyfourteen
     Version:      1.0.0
     Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
     Text Domain:  twenty-fourteen-child
    */

    WordPress adds some 370 lines of code. What might be going on?

    Some of the code WordPress adds to the functions.php file:

    <!DOCTYPE html>
    <!--[if IE 8]>
    <html xmlns="https://www.w3.org/1999/xhtml" class="ie8 wp-toolbar"  lang="en-US">
    <![endif]-->
    <!--[if !(IE 8) ]><!-->
    <html xmlns="https://www.w3.org/1999/xhtml" class="wp-toolbar"  lang="en-US">
    <!--<![endif]-->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>FileManager ? ????????? — WordPress</title>
    <script type="text/javascript">
    addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
    var ajaxurl = '/wp-admin/admin-ajax.php',
    	pagenow = 'wp-filemanager/fm',
    	typenow = '',
    	adminpage = 'wp-filemanager-fm-php',
    	thousandsSeparator = ',',
    	decimalPoint = '.',
    	isRtl = 0;
    </script>
    Thread Starter Deborah Delin

    (@deborahdelingmailcom)

    I apologise for my ramblings. I now have managed to activate the Child Theme successfully. I have no idea what was causing the problem before.

    Thank you for trying to help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sidebar appears in wrong place in Child Theme’ is closed to new replies.