Support » Fixing WordPress » Want to remove header & menus from one page wordpress.org

  • My website name is http://www.GanpatiZone.com

    I want to remove header image and menu bar from one page and just want to insert a image on full page. (Only image and nothing else)

    Please help. I can also provide you the code files. Thanks in advance

    Pankaj

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter pankajzone

    (@pankajzone)

    Dear Samuel – I am not that much into programming stuff. So can u please provide me the code and tell me where to save it. Your help will be highly appriciated.

    Pankaj

    Thread Starter pankajzone

    (@pankajzone)

    I just need a code for plain page. And in it i just want to insert image. PLUS I ALSO WANT TO USE A PLUGIN ON THAT PAGE. So the page should be plugin friendly.

    Thread Starter pankajzone

    (@pankajzone)

    Dear Samuel – Thanks for your link. And with the following code I was able to make a new blank page. This is a new page template code.

    <?php
    /*
    Template Name: Snarfer
    */
    ?>

    I saved this above code as page template and named the file as snarfer.php

    NOW I JUST WANT TO ADD PHOTO/ IMAGE . So what code should I write in this page template file.

    Thanks in advance.

    Thread Starter pankajzone

    (@pankajzone)

    Dear Samuel – With the following code now. I am able to get image in new blank page. I can see the image now. I WANT TO USE A PLUGIN FOR THIS PAGE. SO HOW TO DO THIS.

    THE CODE IS BELOW: This is the page template code snarfer.php
    saved in the theams of wordpress.

    <?php
    /*
    Template Name: Snarfer
    */
    ?>
    <?php if($cat) ?><img src=”image_name.jpg”/><?php ?>

    0sorry – just got back to this
    looks like you made great progress

    so, what kind of plugin do you want to run on the page? If it uses a short code you can just input the code above or below image code.

    Thread Starter pankajzone

    (@pankajzone)

    Thanks. Its a simple plugin. But just want to include in the snarfer.php So any code to write the name of the plugin and call it in this page template file. Please help. Thanks in advance.

    Thread Starter pankajzone

    (@pankajzone)

    I have researched and found out the following.

    That the page template which i have made with theh following code. Page Template Name snarfer.php (Which i saved in the templates directory)

    <?php
    /*
    Template Name: Snarfer
    */
    ?>
    <?php if($cat) ?><img src=”image_name.jpg”/><?php ?>
    ====================

    Now when i add the

    <?php get_header(); ?>

    <?php get_footer(); ?>

    in this above code then the page is displayed with the actual website header image and footeR.

    The Header.php code is below and I want that if I load the (Page Template- snarfer.php ) Then the header website image logo and the links should not be displayed. What need to be done to the header code so that it should only effect this ONE PAGE Snarfer.php

    Header code is :

    <?php
    /**
    * @copyright Copyright (C) 2005 – 2009 RocketTheme, LLC – All Rights Reserved.
    * @license GNU/GPL, see LICENSE.php
    **/
    ?>

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
    <html xmlns=”http://www.w3.org/1999/xhtml&#8221; xml:lang=”en-gb” lang=”en-gb” >
    <head>
    <meta http-equiv=”content-type” content=”text/html; charset=utf-8″ />
    <meta name=”description” content=”<?php bloginfo(‘description’); ?>” />

    <title>
    <?php

    // Returns the title based on what is being viewed

    // Single posts
    if (is_single()) {
    single_post_title(); echo ‘ | ‘; bloginfo(‘name’);

    // The home page or, if using a static front page, the blog posts page.
    } elseif (is_home() || is_front_page()) {

    bloginfo(‘description’);

    // WordPress Pages
    } elseif (is_page()) {
    single_post_title(”); echo ‘ | ‘; bloginfo(‘name’);

    // Search results
    } elseif (is_search()) {
    printf(_r(‘Search results for %s’), ‘”‘.get_search_query().'”‘); echo ‘ | ‘; bloginfo(‘name’);

    // 404 (Not Found)
    } elseif (is_404()) {
    _re(‘Not Found’); echo ‘ | ‘; bloginfo(‘name’);

    // Otherwise:
    } else {
    wp_title(”); echo ‘ | ‘; bloginfo(‘name’);
    }

    ?>
    </title>

    <?php

    $wp_ver = get_bloginfo(‘version’);

    if ($wp_ver < 3.0) {

    ?>

    <link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”<?php bloginfo(‘rss2_url’); ?>” />
    <link rel=”alternate” type=”text/xml” title=”RSS .92″ href=”<?php bloginfo(‘rss_url’); ?>” />
    <link rel=”alternate” type=”application/atom+xml” title=”Atom 0.3″ href=”<?php bloginfo(‘atom_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />

    <?php } ?>

    <style type=”text/css”>

    <?php

    global $after_columns_both;
    after_header_math();

    ?>

    <!–
    #wrapper { margin: 0 auto; width: <?php echo get_option(‘after_template_width’); ?>px;padding:0;}
    .s-c-s #colmid { left:<?php echo get_option(‘after_leftcol_width’); ?>px;}
    .s-c-s #colright { margin-left:-<?php echo $after_columns_both; ?>px;}
    .s-c-s #col1pad { margin-left:<?php echo $after_columns_both; ?>px;}
    .s-c-s #col2 { left:<?php echo get_option(‘after_rightcol_width’); ?>px;width:<?php echo get_option(‘after_leftcol_width’); ?>px;}
    .s-c-s #col3 { width:<?php echo get_option(‘after_rightcol_width’); ?>px;}

    .s-c-x #colright { left:<?php echo get_option(‘after_leftcol_width’); ?>px;}
    .s-c-x #col1wrap { right:<?php echo get_option(‘after_leftcol_width’); ?>px;}
    .s-c-x #col1 { margin-left:<?php echo get_option(‘after_leftcol_width’); ?>px;}
    .s-c-x #col2 { right:<?php echo get_option(‘after_leftcol_width’); ?>px;width:<?php echo get_option(‘after_leftcol_width’); ?>px;}

    .x-c-s #colright { margin-left:-<?php echo get_option(‘after_rightcol_width’); ?>px;}
    .x-c-s #col1 { margin-left:<?php echo get_option(‘after_rightcol_width’); ?>px;}
    .x-c-s #col3 { left:<?php echo get_option(‘after_rightcol_width’); ?>px;width:<?php echo get_option(‘after_rightcol_width’); ?>px;}
    –>
    </style>

    <link rel=”stylesheet” href=”<?php bloginfo(‘template_directory’); ?>/css/<?php echo get_option(‘after_color_style’); ?>.css” type=”text/css” />
    <link rel=”stylesheet” href=”<?php bloginfo(‘template_directory’); ?>/css/wp.css” type=”text/css” />

    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />

    <!–[if lte IE 6]>
    <script type=”text/javascript” src=”<?php bloginfo(‘template_directory’); ?>/js/ie_suckerfish.js”></script>
    <link rel=”stylesheet” href=”<?php bloginfo(‘template_directory’); ?>/css/styles.ie.css” type=”text/css” />
    <![endif]–>
    <!–[if IE 7]>
    <link rel=”stylesheet” href=”<?php bloginfo(‘template_directory’); ?>/css/styles.ie7.css” type=”text/css” />
    <![endif]–>
    <!–[if IE 8]>
    <link rel=”stylesheet” href=”<?php bloginfo(‘template_directory’); ?>/css/styles.ie8.css” type=”text/css” />
    <![endif]–>

    <?php if (get_option(‘rokbox_enabled’) == “true” ) { ?>

    <script type=”text/javascript” src=”<?php bloginfo(‘template_directory’); ?>/js/mootools-release-1.11.js”></script>

    <script type=”text/javascript”>var rokboxPath = “<?php bloginfo(‘template_directory’); ?>/js/rokbox/”;</script>
    <script type=”text/javascript” src=”<?php bloginfo(‘template_directory’); ?>/js/rokbox/rokbox.js”></script>
    <link href=”<?php bloginfo(‘template_directory’); ?>/js/rokbox/themes/<?php echo get_option(‘rokbox_style’); ?>/rokbox-style.css” rel=”stylesheet” type=”text/css” />
    <script type=”text/javascript” src=”<?php bloginfo(‘template_directory’); ?>/js/rokbox/themes/<?php echo get_option(‘rokbox_style’); ?>/rokbox-config.js”></script>

    <?php } ?>

    <?php wp_head(); ?>

    </head>

    <body>
    <div class=”background”></div>
    <div id=”main”>
    <div id=”wrapper” class=”foreground”>
    <div id=”header”>
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Top’) ) : ?>
    <div class=”module”>
    <div class=”module-body”>
    <ul class=”menu”>
    <?php wp_list_bookmarks(‘title_li=&categorize=0&category_name=blogroll&title_before=<span>&title_after=</span>&limit=0’); ?>

    </div>
    </div>

    <?php endif; ?>

    </div>
    /”><span id=”logo” title=”SEO Company | GanpatiZone.com”></span>

    <div id=”nav”>

    <?php if(function_exists(‘wp_nav_menu’)) {

    $my_pages = wp_nav_menu( array(‘menu’ => ‘Top Navigation’, ‘container’ => ‘ul’, ‘menu_class’ => ‘menutop’, ‘echo’ => ‘0’, ‘fallback_cb’ => ‘rok_old_menu’, ‘link_before’ => ‘<span>’, ‘link_after’ => ‘</span>’ ));

    $lines = explode(“\n”, $my_pages);

    $output = “”;
    foreach($lines as $line) {
    $line = trim($line);
    if (substr($line, 0, 4) == “<li “) {

    if (substr($line, -5, 5) != “”) {
    preg_match(“#class=(?<!\\\)\”(.*)(?<!\\\)\”#U”, $line, $klass);
    if (count($klass)) {
    $klass = $klass[0];
    $new_klass = substr($klass, 0, -1);
    $line = str_replace($klass, $new_klass.’ parent”‘, $line);
    }
    }
    }

    $output .= $line.”\n”;
    }

    if(substr($output, -7, 7) == “</div>\n”) $output = substr_replace($output, ”, -7);

    echo $output;

    } else {

    rok_old_menu();

    } ?>

    </div>
    <div id=”message”></div>

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Want to remove header & menus from one page wordpress.org’ is closed to new replies.