• Hi all,

    Here is some elements just to give you the context :

    – Running the website since 1 year without any issue
    – Child theme configuration “ok” since the begining
    – Recently, I’ve updated to the last version of WordPress + last version of plugins + last version of the theme

    And now everything is working well except that the Child theme cannot still show the header in its entirety and the menu that is linked to the header.

    If I choose the original theme (not the child one), the header is showing correctly but not with the child theme, I really don’t understand why.

    Do someone already encountered this kind of issue ? Everything is working fine, the child theme just cannot retrieve the header but all other configuration are ok.

    Thank you very much for your help.

    Regards,
    Romain

    • This topic was modified 4 years, 6 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    It sounds like your child theme modified something in the parent, but the parent has changed enough that that bit of the child is no longer working. You’re going to have to look closely at the child theme. Given what you said, I’d start by looking at CSS related to the header and the child’s header.php file.

    Thread Starter cokzer

    (@cokzer)

    Hi Steve,

    Thank you for your answer.

    I tried to look at the CSS related to the header and the child’s header .php file but I didn’t found anything that could help me and to be honest I’m not a PHP expert.

    Through the Child theme, compared to the parent theme, there is an entire <div> which is missing.

    Here below you can find the child’s header .php file :

    <!DOCTYPE html>
    
    <!--// OPEN HTML //-->
    <html <?php language_attributes(); ?>>
    
    	<!--// OPEN HEAD //-->
    	<head>
    		
    		<!-- Google Tag Manager -->
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-NB5KZQB');</script>
    <!-- End Google Tag Manager -->
    		
    		<!-- Manually set render engine for Internet Explorer, prevent any plugin overrides -->
    		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10">
    		
    		<?php
    	        $page_class = "";
    
    			if ( function_exists( 'sf_page_classes' ) ) {
    				$page_classes = sf_page_classes();
    				$page_class = $page_classes['page'];
    			}
    
    	        global $post, $sf_options;
    	        $extra_page_class = $page_header_type = "";
    	        $page_layout      = $sf_options['page_layout'];
    	        $header_layout    = $sf_options['header_layout'];
    	        if ( isset( $_GET['layout'] ) ) {
    	            $page_layout = $_GET['layout'];
    	        }
    	        if ( $post && !( is_archive() || is_category() ) ) {
    	            $extra_page_class = sf_get_post_meta( $post->ID, 'sf_extra_page_class', true );
    	        }
    	        if ( is_page() && $post ) {
    	            $page_header_type = sf_get_post_meta( $post->ID, 'sf_page_header_type', true );
    	        }
    			if ( $page_header_type == "below-slider" && $page_layout == "boxed" ) {
    				add_action( 'sf_before_page_container', 'sf_pageslider', 20 );
    	        } else if ( $page_header_type == "below-slider" && ( $header_layout != "header-vert" || $header_layout != "header-vert-right" ) ) {
    	            add_action( 'sf_container_start', 'sf_pageslider', 5 );
    	        } else {
    	            add_action( 'sf_container_start', 'sf_pageslider', 30 );
    	        }
    
    	        if ( $page_header_type == "naked-light" || $page_header_type == "naked-dark" ) {
    	            remove_action( 'sf_main_container_start', 'sf_breadcrumbs', 20 );
    	        }
    	    ?>
    
    		<?php wp_head(); ?>
    
    <!-- Pop up Mailchimp subscribers list 
    <script type="text/javascript" src="//downloads.mailchimp.com/js/signup-forms/popup/unique-methods/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">window.dojoRequire(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us20.list-manage.com","uuid":"f992833fa4ddb63ead56578b2","lid":"85e7d05c43","uniqueMethods":true}) })</script>-->
    		
    	<!--// CLOSE HEAD //-->
    	</head>
    
    	<!--// OPEN BODY //-->
    	<body <?php body_class($page_class.' '.$extra_page_class); ?>>
    
    <!-- Load Facebook SDK for JavaScript -->
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = 'https://connect.facebook.net/fr_FR/sdk/xfbml.customerchat.js';
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    
    <!-- Your customer chat code -->
    <div class="fb-customerchat"
      attribution=setup_tool
      page_id="266393387187811"
      theme_color="#60B96F"
      logged_in_greeting="Bonjour, comment puis-je vous aider ?"
      logged_out_greeting="Bonjour, comment puis-je vous aider ?">
    </div>		
    		
    	<!-- Google Tag Manager (noscript) -->
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NB5KZQB"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <!-- End Google Tag Manager (noscript) -->	
    
    		
    
    		
    		<?php
    			/**
    			 * @hooked - sf_site_loading - 5
    			 * @hooked - sf_fullscreen_search - 6
    			 * @hooked - sf_mobile_menu - 10
    			 * @hooked - sf_mobile_cart - 20
    			 * @hooked - sf_sideslideout - 40
    			**/
    			do_action('sf_before_page_container');
    		?>
    
    		<!--// OPEN #container //-->
    		<div id="container">
    
    			<?php
    				/**
    				 * @hooked - sf_pageslider - 5 (if above header)
    				 * @hooked - sf_mobile_header - 10
    				 * @hooked - sf_header_wrap - 20
    				**/
    				do_action('sf_container_start');
    			?>
    
    			<!--// OPEN #main-container //-->
    			<div id="main-container" class="clearfix">
    
    				<?php
    					/**
    					 * @hooked - sf_pageslider - 10 (if standard)
    					 * @hooked - sf_breadcrumbs - 20
    					 * @hooked - sf_page_heading - 30
    					**/
    					do_action('sf_main_container_start');
    				?>

    Hope it could help, don’t hesitate to tell me if you would need further information.

    Regards,
    Romain

    Thread Starter cokzer

    (@cokzer)

    Update : This is the HTML code which is present through the parent theme but not within the child theme :

    <div id="header-sticky-wrapper" class="sticky-wrapper" style="height: 120px;"><header id="header" class="sticky-header clearfix">
    	<div class="container">
    		<div class="row">
    			
    			<div class="header-left col-sm-4">
    				<div class="aux-item"><a href="#"><span>Menu</span></a></div>
    			</div>
    		
    			<div id="logo" class="col-sm-4 logo-center has-img clearfix" data-anim="">
    <a href="https://www.potagerme.bio/?customize_changeset_uuid=bb0d7fb5-7491-4716-a39f-ed6e1105dab9&customize_autosaved=on&customize_theme=atelier&customize_messenger_channel=preview-0">
    <img src="https://res.cloudinary.com/dmql0dbf8/image/upload/$wpsize_!_cld_full!,w_1322,h_365,c_scale/v1588929908/logo_final.png" alt="Potagerme - Potager d'intérieur en hydroponie" width="1322" height="365" />
    <div class="text-logo"></div>
    </a>
    </div>
    			
    			<div class="header-right col-sm-4">
    							</div>
    		
    		</div> <!-- CLOSE .row -->
    	</div> <!-- CLOSE .container -->
    </header></div>

    Regards,
    Romain

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I no longer see the code on your page. Did you manage to fix this?

    Thread Starter cokzer

    (@cokzer)

    No I didn’t manage it, which code are you talking about ?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Sorry, I responded to the wrong question.

    In what way is the header incorrect?

    Thread Starter cokzer

    (@cokzer)

    Here is the context :

    1) you got the website on production (which is the child theme without displaying the header) that you can find here : https://www.potagerme.bio -> no header there.

    2) the code that I’ve linked above is the HTML of the header that I’ve inspected through the console when I was in preview visualisation on the parent theme. It seems that it is this code that the child theme is not able to gather.

    Don’t hesitate if you need further information.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I don’t see anything obvious. You’re going to have to debug this. Do that by adding bit of code (e.g, wp_die('made it to line xxx); and/or comment out various blocks.

    Are you using the Storefront theme as the parent?

    Thread Starter cokzer

    (@cokzer)

    Thank for your help, I don’t have the knowledge for editing PHP content but anyway, I think I’ll put back the parent theme activated, delete the child theme and create a new child theme, would it be okay is I do this ?

    And no I’m not using the StoreFront theme, I’m using the “Atelier” theme from Swift Ideas but there are not any ressources online and forums, I have to pay the official support…

    • This reply was modified 4 years, 5 months ago by cokzer.
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Childtheme issue after WordPress update’ is closed to new replies.