WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Child Theme Edits Not Showing Up (7 posts)

  1. bonicaayala
    Member
    Posted 1 year ago #

    Hi, I'm using wp theme twenty twelve, and I'm trying to move my header above the navigation menu using a child theme, but the edits are not showing up.

    The child theme is selected and below is the php I have entered. I previously made this edit in the parent theme and it worked, but reverted the header page back to it's original content, bc I don't want to mess with the parent themes.

    Help or a point in the right direction is greatly appreciated.

    /*
    Theme Name:Twenty Twelve Child
    Version: 1.0
    Theme URI: http://quirm.net/themes
    Description: A basic starter child theme for Twenty Twelve
    Author: Mel Pedley
    Author URI: http://blackwidows.co.uk
    Template: twentytwelve
    License: GNU General Public License v2
    License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    */
    
    @import url(../twentytwelve/style.css);
    
    <?php
    /**
     * The Header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="main">
     *
     * @package WordPress
     * @subpackage Twenty_Twelve
     * @since Twenty Twelve 1.0
     */
    ?><!DOCTYPE html>
    <!--[if IE 7]>
    <html class="ie ie7" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if IE 8]>
    <html class="ie ie8" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if !(IE 7) | !(IE 8)  ]><!-->
    <html <?php language_attributes(); ?>>
    <!--<![endif]-->
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta name="viewport" content="width=device-width" />
    <title><?php wp_title( '|', true, 'right' ); ?></title>
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
    <!--[if lt IE 9]>
    <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
    <![endif]-->
    <?php wp_head(); ?>
    </head>
    
    <body <?php body_class(); ?>>
    <div id="page" class="hfeed site">
    	<header id="masthead" class="site-header" role="banner">
    		<hgroup>
    			<h1 class="site-title"><a>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    			<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
    		</hgroup>
    		<?php $header_image = get_header_image();
    		if ( ! empty( $header_image ) ) : ?>
    			<a>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
    		<?php endif; ?>
    
    		<nav id="site-navigation" class="main-navigation" role="navigation">
    			<h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>
    			<a href="#content">"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
    		</nav><!-- #site-navigation -->
    	</header><!-- #masthead -->
    
    	<div id="main" class="wrapper">
  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Is that header.php code in the style.css file? That's never correct. You need to put that in header.php file in the child theme.

  3. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

  4. bonicaayala
    Member
    Posted 1 year ago #

    ok. I think I have a bigger problem now.

    I tried to make a change to the child functions.php which I now know was so wrong.

    My blog no longer comes up, I'm unable to get to my admin dashboard, all i get when I go to my site is a white page with the following error:

    Parse error: syntax error, unexpected '<' in /var/www/vhosts/bonicaayala.com/httpdocs/blog/wp-content/themes/twentytwelve-child/functions.php on line 5

    help!

  5. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Yes, you will need to delete that file using FTP or other file manager access to your site - find it here:

    wordpress
       wp-content
           themes
              twentytwelve-child
                  functions.php
                  style.css

    If you don't have FTP set up, ask your hosting company about how to do that. Or you can use Cpanel if that's what you are using.

  6. bonicaayala
    Member
    Posted 1 year ago #

    Thanks!

    delete only the functions.php file or the entire twentytwelve-child theme folder?

  7. bonicaayala
    Member
    Posted 1 year ago #

    fixed. thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic