• Hi all,

    Twenty Twelve Theme
    Cimy Header Image Rotator – plugin
    twentytwelve-child theme
    /twentytwelve/header.php

    <?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="https://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 href="<?php echo esc_url( home_url( '/' ) ); ?>" 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>
    
    		<nav id="site-navigation" class="main-navigation" role="navigation">
    			<h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>
    			<a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
    		</nav><!-- #site-navigation -->
    
    		<?php $header_image = get_header_image();
    		if ( ! empty( $header_image ) ) : ?>
    			<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><div id="cimy_div_id_0">Loading images...</div>
    <div class="cimy_div_id_0_caption"></div>
    <style type="text/css">
        #cimy_div_id_0 {
    		float: left;
    		margin: 1em auto;
    		border: 0px solid #000000;
    		width: 950px;
    		height: 260px;
    	}
    	div.cimy_div_id_0_caption {
    		position: absolute;
    		margin-top: 175px;
    		margin-left: -75px;
    		width: 150px;
    		text-align: center;
    		left: 50%;
    		padding: 5px 10px;
    		background: black;
    		color: white;
    		font-family: sans-serif;
    		border-radius: 10px;
    		display: none;
    		z-index: 2;
    	}
    </style>
    </a>
    		<?php endif; ?>
    	</header><!-- #masthead -->
    
    	<div id="main" class="wrapper">

    /twentytwelve/style.css

    /*
    Theme Name:     Twenty Twelve Child
    Theme URI:      https://piano-02.satimis.com/
    Description:    Child theme for the Twenty twelve theme
    Template:       twentytwelve
    Version:        0.1.0
    */
    @import url("../twentytwelve/style.css");

    Menu bar disappears.

    URL – piano-02.satimis.com

    Pls advise how to rectify it? Thanks

    Rgds
    satimis

Viewing 12 replies - 1 through 12 (of 12 total)
  • Looks like the child theme isn’t set up correctly – and your changes to the header.php should ONLY be in the child theme. Do not modify any files in twentytwelve parent theme.

    This is the file structure you should have:

    wp-content
         themes
             twentytwelve (NO modified files)
             twentytwelvechild
                  style.css (the above in it)
                  header.php (modified version)

    Then activate the child theme.

    Thread Starter satimis

    (@satimis)

    Hi,

    I only modified header.php on twentytwelve-child and the latter has been activated already.

    Tried again;
    -Activated twentytwelve
    -Activated twentytwelve-child again

    The navigation menu bar comes back but header disappeared.

    Looked at Settings -> Cimy Header Image Rotator
    All header images found there.

    How to fix it? Thanks in advance

    Edit:
    Whether add follows on style.css under twentytwelve-child? Not header.php;

    <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="https://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 href="<?php echo esc_url( home_url( '/' ) ); ?>" 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>
    
    		<nav id="site-navigation" class="main-navigation" role="navigation">
    			<h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>
    			<a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
    		</nav><!-- #site-navigation -->
    
    		<?php $header_image = get_header_image();
    		if ( ! empty( $header_image ) ) : ?>
    			<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><div id="cimy_div_id_0">Loading images...</div>
    <div class="cimy_div_id_0_caption"></div>
    <style type="text/css">
        #cimy_div_id_0 {
    		float: left;
    		margin: 1em auto;
    		border: 0px solid #000000;
    		width: 950px;
    		height: 260px;
    	}
    	div.cimy_div_id_0_caption {
    		position: absolute;
    		margin-top: 175px;
    		margin-left: -75px;
    		width: 150px;
    		text-align: center;
    		left: 50%;
    		padding: 5px 10px;
    		background: black;
    		color: white;
    		font-family: sans-serif;
    		border-radius: 10px;
    		display: none;
    		z-index: 2;
    	}
    </style>
    </a>
    		<?php endif; ?>
    	</header><!-- #masthead -->
    
    	<div id="main" class="wrapper">

    satimis

    Now it looks like you have it working in twentyeleven?

    Thread Starter satimis

    (@satimis)

    Hi WPyogi,

    It is true. On searching I found some folks also encountering problem making Cimy Header Image Rotator to work on Twenty Twelve Theme. Therefore I dropped my test and now come back to Twenty Eleven Theme.

    Rgds
    satimis

    That’s weird. I’ve just finished work on a child of Twenty Twelve that uses Cimy’s Header Image Rotator and it worked perfectly straight out of the box.

    Thread Starter satimis

    (@satimis)

    Hi esmi,

    Tried again on satimis-03.satimis.com

    Steps performed as follows;
    Activate twentytwelve
    Create twentytwelve-child folder
    Create /twentytwelve-child/style.css with following content on the fild;

    /*
    Theme Name:     Twenty Twelve Child
    Theme URI:      https://piano-03.satimis.com/
    Description:    Child theme for the Twenty Twelve theme
    Template:       twentytwelve
    Version:        0.1.0
    */
    @import url("../twentytwelve/style.css");

    -> Settings -> Cimy Header Image Rotator
    upload 4 pictures size 960 x 250

    (check) Plug=in’s uploaded (4 pictures)
    Border 0
    Width 960
    Height 250
    Fade effect 1
    -> Save Changes

    Copy following code in your theme where you want image rotation:

    <div id="cimy_div_id_0">Loading images...</div>
    <div class="cimy_div_id_0_caption"></div>
    <style type="text/css">
    	#cimy_div_id_0 {
    		float: left;
    		margin: 1em auto;
    		border: 0px solid #000000;
    		width: 960px;
    		height: 250px;
    	}
    	div.cimy_div_id_0_caption {
    		position: absolute;
    		margin-top: 175px;
    		margin-left: -75px;
    		width: 150px;
    		text-align: center;
    		left: 50%;
    		padding: 5px 10px;
    		background: black;
    		color: white;
    		font-family: sans-serif;
    		border-radius: 10px;
    		display: none;
    		z-index: 2;
    	}
    </style>
    <noscript>
    	<div id="cimy_div_id_0_nojs">
    		<img id="cimy_img_id" src="https://piano-03.satimis.com/wp-content/Cimy_Header_Images/0/chrysanthemum_n_Tulip_Garden_1000x288_960x250.png" alt="" />
    	</div>
    </noscript>

    On line (50) of /twentytwelve-child/header.php delete

    <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="" />

    Paste above lines on “Copy following code in your theme where you want image rotation:”
    -> Save

    – > Appearance -> Themes
    Activate Twenty Twelve Child

    No header image displayed. Please help.

    Thanks

    Rgds
    satimis

    Just add:

    <div id="cimy_div_id_0"></div>
    <div class="cimy_div_id_0_caption"></div>

    to your child theme’s header.php file. The CSS needs to go into your child theme’s CSS.

    Thread Starter satimis

    (@satimis)

    Hi esmi,

    I already have following lines on child theme’s header.php

    ....
    <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
    <div id="cimy_div_id_0"><Loading images.../div>
    <div class="cimy_div_id_0_caption"></div>
    ....

    Deleting “Loading images…” makes no difference. Still header’s images couldn’t be displayed.

    Rgds
    satimis

    Have you assigned any images to the Cimy Main configuration yet?

    Thread Starter satimis

    (@satimis)

    Yes. Already upload 4 image files

    -> Settings -> Cimy Header Image Rotator.
    There are 4 image files under “Image”

    satimis

    Do you have any other active plugin? If so, have you tried deactivating them?

    Thread Starter satimis

    (@satimis)

    Hi esmi,

    Following plugins come as defaut during installing WordPress and activated already:-
    Go Daddy Quick Setup
    Jetpack by WordPress.com
    Welcome to WordPress

    WP Editor plugin was added later by me.

    Deactivate all of them. Situation doesn’t change, no header image displayed

    line 50 before editing;
    <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><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>

    After editing;

    <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><div id="cimy_div_id_0"><Loading images.../div>
    <div class="cimy_div_id_0_caption"></div>
    <style type="text/css">
        #cimy_div_id_0 {
    		float: left;
    		margin: 1em auto;
    		border: 0px solid #000000;
    		width: 960px;
    		height: 250px;
    	}
    	div.cimy_div_id_0_caption {
    		position: absolute;
    		margin-top: 175px;
    		margin-left: -75px;
    		width: 150px;
    		text-align: center;
    		left: 50%;
    		padding: 5px 10px;
    		background: black;
    		color: white;
    		font-family: sans-serif;
    		border-radius: 10px;
    		display: none;
    		z-index: 2;
    	}
    </style>
    <noscript>
    	<div id="cimy_div_id_0_nojs">
    		<img id="cimy_img_id" src="https://piano-03.satimis.com/wp-content/Cimy_Header_Images/0/chrysanthemum_n_Tulip_Garden_1000x288_960x250.png" alt="" />
    	</div>
    </noscript>
    </a>

    I wonder whether it is the correct place for replacing those lines on it.

    satimis

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘No menu bar’ is closed to new replies.