Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • I am using the inove theme. I am very new to PHP. I copied the header.php code below. Not sure if it has what I need or not. Thanks for the quick response.

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”&gt;
    <?php
    global $inove_nosidebar;
    $options = get_option(‘inove_options’);
    if (is_home()) {
    $home_menu = ‘current_page_item’;
    } else {
    $home_menu = ‘page_item’;
    }
    if($options[‘feed’] && $options[‘feed_url’]) {
    if (substr(strtoupper($options[‘feed_url’]), 0, 7) == ‘http://&#8217;) {
    $feed = $options[‘feed_url’];
    } else {
    $feed = ‘http://&#8217; . $options[‘feed_url’];
    }
    } else {
    $feed = get_bloginfo(‘rss2_url’);
    }
    ?>

    <html xmlns=”http://www.w3.org/1999/xhtml”&gt;
    <head profile=”http://gmpg.org/xfn/11″&gt;
    <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />
    <meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ />

    <title><?php bloginfo(‘name’); ?><?php wp_title(); ?></title>
    <link rel=”alternate” type=”application/rss+xml” title=”<?php _e(‘RSS 2.0 – all posts’, ‘inove’); ?>” href=”<?php echo $feed; ?>” />
    <link rel=”alternate” type=”application/rss+xml” title=”<?php _e(‘RSS 2.0 – all comments’, ‘inove’); ?>” href=”<?php bloginfo(‘comments_rss2_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />

    <!– style START –>
    <!– default style –>
    <style type=”text/css” media=”screen”>@import url( <?php bloginfo(‘stylesheet_url’); ?> );</style>
    <!– for translations –>
    <?php if (strtoupper(get_locale()) == ‘ZH_CN’ || strtoupper(get_locale()) == ‘ZH_TW’) : ?>
    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_directory’); ?>/chinese.css” type=”text/css” media=”screen” />
    <?php elseif (strtoupper(get_locale()) == ‘HE_IL’ || strtoupper(get_locale()) == ‘FA_IR’ || strtoupper(get_locale()) == ‘UG_CN’ || strtoupper(get_locale()) == ‘CKB’) : ?>
    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_directory’); ?>/rtl.css” type=”text/css” media=”screen” />
    <?php endif; ?>
    <!–[if IE]>
    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_directory’); ?>/ie.css” type=”text/css” media=”screen” />
    <![endif]–>
    <!– style END –>

    <!– script START –>
    <script type=”text/javascript” src=”<?php bloginfo(‘template_url’); ?>/js/base.js”></script>
    <script type=”text/javascript” src=”<?php bloginfo(‘template_url’); ?>/js/menu.js”></script>
    <!– script END –>

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

    <?php flush(); ?>

    <body>
    <!– wrap START –>
    <div id=”wrap”>

    <!– container START –>
    <div id=”container” <?php if($options[‘nosidebar’] || $inove_nosidebar){echo ‘class=”one-column”‘;} ?> >

    <?php include(‘templates/header.php’); ?>

    <!– content START –>
    <div id=”content”>

    <!– main START –>
    <div id=”main”>

    I added the 2 sections of bolded code below. I want to remove the sidebar on all pages except the home/frontpage. I put an if statement to say if it is the frontpage show the bar otherwise don’t. It doesn’t work. Am I missing something?

    Thanks,
    Marc

    /* content START */
    #content {
    background:#FFF url(img/sidesep.gif) right repeat-y;
    /* mab min-height:400px; */

    <?php
    global $post; // if outside the loop
    if (is_front_page()) { // test to see if the page is frontpage
    min-height:400px; // Leave the sidebar
    } else { // Not frontpage
    min-height:800px; // Remove the sidebar
    }
    ?>

    }
    /* content END */

    /* main START */
    #main {
    background:#FFF url(img/main_shadow.gif) top repeat-x;
    /* mab width:605px; */
    <?php
    global $post; // if outside the loop
    if (is_front_page()) { // test to see if the page is frontpage
    width:605px; // Leave the sidebar
    } else { // Not frontpage
    width:900px; // Remove the sidebar
    }
    ?>

    padding:13px 15px 15px;
    float:left;
    overflow:hidden;

Viewing 2 replies - 1 through 2 (of 2 total)