Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2009
    Posts
    50
    Thanks
    20
    Thanked 0 Times in 0 Posts

    Exclamation Need to place header at the top of our page

    Hi Guys,

    I have a website that has a homepage without a title bar but the rest of the pages in the site do have it. I want to apply this same bar to the homepage can anyone help. See below the 3 main pieces of code:

    This is the code for the Header

    PHP Code:
    <?php
    ?>
    <!DOCTYPE html>
    <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
    <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
    <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
    <!--[if (gte IE 9)|!(IE)]><!--><html <?php language_attributes(); ?>> <!--<![endif]-->

    <!-- head -->
    <head>

    <!-- meta -->
    <meta charset="<?php bloginfo'charset' ); ?>" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <?php if( mfn_opts_get('responsive') ) echo '<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">'?>

    <title><?php
    global $post;
    if( 
    mfn_opts_get('mfn-seo') && is_object($post) && get_post_metaget_the_ID(), 'mfn-meta-seo-title'true ) ){
        echo 
    stripslashesget_post_metaget_the_ID(), 'mfn-meta-seo-title'true ) );
    } else {
        global 
    $page$paged;
        
    wp_title'|'true'right' );
        
    bloginfo'name' );
        if ( 
    $paged >= || $page >= ) echo ' | ' sprintf__'Page %s''bretheon' ), max$paged$page ) );
    }
    ?></title>

    <!-- stylesheet -->
    <link rel="stylesheet" href="<?php bloginfo'stylesheet_url' ); ?>" media="all" />
    <?php do_action('wp_styles'); ?>

    <!-- wp_head() -->
    <link rel="shortcut icon" href="<?php mfn_opts_show('favicon-img',THEME_URI .'/images/favicon.ico'); ?>" type="image/x-icon" />    

    <?php if( is_single() ): ?>
    <script>var switchTo5x=true;</script>
    <script src="http://w.sharethis.com/button/buttons.js"></script>
    <script>stLight.options({publisher: "ur-6568e777-919c-a5dd-ac31-98a6fa2e6b2d"}); </script>
    <?php endif; ?>
    <?php do_action
    ('wp_seo'); ?>

    <?php wp_head();?>
    </head>

    <!-- body -->
    <body <?php body_class(); ?>>    
        <div id="Wrapper">
        
             <?php 
                get_template_part
    'includes/header''top-area' );
        
                 if( ! 
    is_404() ){
                    
    $slider false;
                    if( 
    get_post_type()=='page' $slider get_post_metaget_the_ID(), 'mfn-post-slider'true );
                    
                    if( 
    $slider ){
                        if( 
    $slider == 'mfn-offer-slider' ){
                            
    // Mfn Offer Slider
                            
    get_template_part'includes/header''offer-slider' );
                        } else {
                            
    // Revolution Slider
                            
    echo '<div id="mfn-rev-slider">';
                                
    putRevSlider$slider );
                            echo 
    '</div>';
                        }
                    } elseif( 
    trimwp_title''false ) ) ){
                        
    // Page title
                        
    echo '<div id="Subheader">';
                            echo 
    '<div class="container">';
                                echo 
    '<div class="sixteen columns">';
                                    if( 
    get_post_type()=='page' || is_single() ){
                                        echo 
    '<h1>'$post->post_title .'</h1>';
                                    } else {
                                        echo 
    '<h1>'trimwp_title''false ) ) .'</h1>';
                                    }
                                    
    mfn_breadcrumbs();
                                echo 
    '</div>';
                            echo 
    '</div>';
                        echo 
    '</div>';
                    }
                }
            
    ?>
    This is the code for the Index page which is the homepage

    PHP Code:
    <?php

    get_header
    (); 
    $sidebar mfn_sidebar_classes();
    ?>

    <!-- #Content -->
    <div id="Content">
        <div class="container">

            <!-- .content -->
            <?php 
                
    if( $sidebar ) echo '<div class="content">';
                echo 
    '<div class="the_content the_content_wrapper">';
                
                while ( 
    have_posts() )
                {
                    
    the_post();
                    
    get_template_part'includes/content'get_post_type() );
                }
                
                
    // pagination
                
    if(function_exists'mfn_pagination' )):
                    
    mfn_pagination();
                else:
                
    ?>
                    <div class="nav-next"><?php next_posts_link(__('&larr; Older Entries''bretheon')) ?></div>
                    <div class="nav-previous"><?php previous_posts_link(__('Newer Entries &rarr;''bretheon')) ?></div>
                <?php
                
    endif;
                
                echo 
    '</div>';
                if( 
    $sidebar ){
                    echo 
    '</div>';
                } else {
                    echo 
    '<div class="clearfix"></div>';
                }
            
    ?>    
            
            <!-- Sidebar -->
            <?php 
                
    if( $sidebar ){
                    
    get_sidebar'blog' );
                }
            
    ?>

        </div>
    </div>


    <?php get_footer(); ?>
    This is the code for the inner pages which contain the title bar

    PHP Code:
    <?php

    get_header
    ();
    $sidebar mfn_sidebar_classes();
    ?>
        
    <!-- Content -->
    <div id="Content">
        <div class="container">

            <!-- .content -->
            <?php 
                
    if( $sidebar ) echo '<div class="content">';
                
                while ( 
    have_posts() )
                {
                    
    the_post();
                    
    get_template_part'includes/content''page' );
                }

                if( 
    $sidebar ){
                    echo 
    '</div>';
                } else {
                    echo 
    '<div class="clearfix"></div>';
                }
            
    ?>    
            
            <!-- Sidebar -->
            <?php 
                
    if( $sidebar ){
                    
    get_sidebar();
                }
            
    ?>

        </div>
    </div>

    <?php get_footer(); ?>

  • #2
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    738
    Thanks
    20
    Thanked 85 Times in 85 Posts
    does the theme not have a setting for a presentation page?

    some wp themes allow different options for the homepage to the rest of the site.
    There are 10 types of people on CodingForums,
    Those who understand Binary and those who dont.
    Get Cloud Hosting now from only£59 / month

  • #3
    New Coder
    Join Date
    Jun 2009
    Posts
    50
    Thanks
    20
    Thanked 0 Times in 0 Posts
    Hi Articwarrio,

    No unfortunately it has no option for this at all. I thought I could just find the code that makes the title bar display and then copy it onto the index page. The site can be viewed at http://www.reflex.ie/wordpress

  • #4
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    738
    Thanks
    20
    Thanked 85 Times in 85 Posts
    that site has a header on all pages, did you fix it?
    There are 10 types of people on CodingForums,
    Those who understand Binary and those who dont.
    Get Cloud Hosting now from only£59 / month


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •