• Resolved euphoria360

    (@euphoria360)


    As you guys probably know, Tempera doesnt support ubermenu out of the box.
    As a user of ubermenu i had a difficult time integrating it into tempera since i havd almost no knowledge about php and css codes. But i did some research and today i finally was able to integrate it perfectly with tempera.
    So i thought it might be a good idea to share it with others too.

    First step is to create a child theme from tempera. this is a must because if you dont do it, all your work will be gone after a tempera update.

    so after you created your child theme, go to its folder, create a file named “header.php” and paste these into it:

    <?php
    /**
     * The Header
     *
     * Displays all of the <head> section and everything up till <div id="main">
     *
     * @package Cryout Creations
     * @subpackage tempera
     * @since tempera 0.5
     */
     ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <?php  cryout_meta_hook(); ?>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
    <link rel="profile" href="https://gmpg.org/xfn/11" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php
     	cryout_header_hook();
    	wp_head(); ?>
    </head>
    <body <?php body_class(); ?>>
    
    <?php cryout_body_hook(); ?>
    
    <div id="wrapper" class="hfeed">
    <div id="topbar" ><div id="topbar-inner"> <?php cryout_topbar_hook(); ?> </div></div>
    <?php cryout_wrapper_hook(); ?>
    
    <div id="header-full">
    	<header id="header">
               <?php cryout_masthead_hook(); ?>
    		<div id="masthead">
    			<div id="branding" role="banner" >
    				<?php cryout_branding_hook();?>
    				<?php cryout_header_widgets_hook(); ?>
    				<div style="clear:both;"></div>
    			</div><!-- #branding -->
    		</div><!-- #masthead -->
    	</header><!-- #header -->
            <header id="header">
    	     <?php if( function_exists( 'ubermenu' ) ): ?>
                     <?php ubermenu( 'main' , array( 'theme_location' => 'primary' ) ); ?>
                 <?php else: ?>
                     <nav id="access2" role="navigation">
    	             <?php cryout_access_hook();?>
                     </nav>
                 <?php endif; ?>
             </header><!-- #header -->
    </div><!-- #header-full -->
    
    <div style="clear:both;height:0;"> </div>
    
    <div id="main">
    		<?php cryout_main_hook(); ?>
    	<div  id="forbottom" >
    		<?php cryout_forbottom_hook(); ?>
    
    		<div style="clear:both;"> </div>
    
    		<?php cryout_breadcrumbs_hook();?>

    voalla. enjoy. also notice that i choosed “primary” theme location for ubermenu.

Viewing 1 replies (of 1 total)
  • Thread Starter euphoria360

    (@euphoria360)

    This is the part that has been changed from default:

    <div id="header-full">
    	<header id="header">
               <?php cryout_masthead_hook(); ?>
    		<div id="masthead">
    			<div id="branding" role="banner" >
    				<?php cryout_branding_hook();?>
    				<?php cryout_header_widgets_hook(); ?>
    				<div style="clear:both;"></div>
    			</div><!-- #branding -->
    		</div><!-- #masthead -->
    	</header><!-- #header -->
            <header id="header">
    	     <?php if( function_exists( 'ubermenu' ) ): ?>
                     <?php ubermenu( 'main' , array( 'theme_location' => 'primary' ) ); ?>
                 <?php else: ?>
                     <nav id="access" role="navigation">
    	             <?php cryout_access_hook();?>
                     </nav>
                 <?php endif; ?>
             </header><!-- #header -->
    </div><!-- #header-full -->

Viewing 1 replies (of 1 total)
  • The topic ‘Ubermenu Integration’ is closed to new replies.