PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Oct 22, 2018 8:30 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Sun Jan 30, 2011 9:52 am 
Offline
Forum Newbie

Joined: Sun Jan 30, 2011 9:41 am
Posts: 3
Hello! At first I want to say sorry as this might be a very simple task for most of the people in this forum, but as a newbie I need some help. I have some books in PHP and tried to find a solution but didn't manage.

My task is to try to locate the header <div> on the following code:

Syntax: [ Download ] [ Hide ]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head profile="http://gmpg.org/xfn/11">

<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Archive <?php } ?> <?php wp_title(); ?></title>

<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
<!-- Styles  -->
<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" />
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/print.css" type="text/css" media="print" />
<!--[if IE]><link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/ie.css" type="text/css" media="screen, projection" /><![endif]-->
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_head();
        $options = get_option('f8_theme_options');
?>
</head>

<body <?php body_class(); ?>>
<div class="container">
<div class="container-inner">

<!-- Begin rss -->
<div id="inside-subscribe">
        <a href="<?php bloginfo('rss2_url'); ?>" class="feed">posts</a> <a href="<?php bloginfo('comments_rss2_url'); ?>" class="feed">comments</a>
</div>
<div class="clear"></div>

<!-- Begin Masthead -->
<div id="masthead" class="clearfix">
    <h4 class="left"><a href="<?php echo get_option('home'); ?>/" title="Home"><?php bloginfo('name'); ?></a> <span class="description"><?php bloginfo('description'); ?></span><span class="contact"><?php if ( $options['phone'] != '' ) { ?><?php echo $options['phone']; ?><br /><?php } if ( $options['email'] != '' ) { ?><a href="mailto:<?php echo $options['email']; ?>"><?php echo $options['email']; ?></a><?php } ?></span></h4>
</div>

<?php
        $slideshow = $options['selectinput'];
        // Only show this is the Single Header Image is selected or if no option is set
        if ( $slideshow == 1 || !$slideshow ) {
                // Check if this is a post or page, if it has a thumbnail, and if it's a big one
                if ( is_singular() &&
                                has_post_thumbnail( $post->ID ) &&
                                ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( '950', '425' ) ) ) &&
                                $image[1] >= HEADER_IMAGE_WIDTH ) :
                        // Houston, we have a new header image!
                        echo get_the_post_thumbnail( $post->ID, '950x425' );
                else : ?>
                        <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="<?php bloginfo('name'); ?>" class="headerimg" />
        <?php endif;
        } // End only show if Single Header Image is selected
?>


<?php
        if ( is_home() && $paged < 1 ) {
                get_template_part( 'slideshow' );
        }
?>

<!-- Begin Navigation -->
<?php f8_theme_nav(); ?>


the reason is because I want to replace it with this code:

Syntax: [ Download ] [ Hide ]
<?php if (is_front_page()) { ?>
 
  <div id="header"> <!– This is the Header id that you want on your Front Page –>
 
<?php } else { ?>
 
  <div id="<?php echo $post->post_name; ?>"> <!– An alternative header is defined, based on the page title –>
 
<?php } ?>


in order to have the rest of the pages of my website without header, just with the title. Im using Wordpress and Graph Papers template F8 Lite :)

Thaaaaaaaaank you so much!!!


Top
 Profile  
 
PostPosted: Sun Jan 30, 2011 11:31 am 
Offline
DevNet Master
User avatar

Joined: Sun Feb 15, 2009 12:08 pm
Posts: 2794
Location: .za
Not sure if this is theme dependant but the masthead id is the first div after the header div, make a backup of your files then comment the masthead div.
Hth

_________________
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering


Top
 Profile  
 
PostPosted: Sun Jan 30, 2011 5:47 pm 
Offline
Forum Newbie

Joined: Sun Jan 30, 2011 9:41 am
Posts: 3
Thaank you so much for your reply!!
I tried as you suggested, didn't work out :(
Still trying to find the solution.. :) :)


Top
 Profile  
 
PostPosted: Tue Feb 01, 2011 3:10 am 
Offline
DevNet Master
User avatar

Joined: Sun Feb 15, 2009 12:08 pm
Posts: 2794
Location: .za
Can you paste the url where you downloaded the template

_________________
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering


Top
 Profile  
 
PostPosted: Sat Feb 05, 2011 7:33 pm 
Offline
Forum Newbie

Joined: Sun Jan 30, 2011 9:41 am
Posts: 3
Thank you so much social_experiment!! :)
Im still trying but somehow I mess up with the code and can't get the result I want.

The URL I downloaded the template is this:

http://graphpaperpress.com/themes/f8-static/

Thank you!


Top
 Profile  
 
PostPosted: Sun Feb 06, 2011 6:32 am 
Offline
DevNet Master
User avatar

Joined: Sun Feb 15, 2009 12:08 pm
Posts: 2794
Location: .za
rainbow_child_d wrote:
in order to have the rest of the pages of my website without header

I don't know what you mean with 'header' in this sentence but the below the 'masthead' div is where the heading, title etc starts. The code below removes the image (or slideshow?) and displays just a text header. This is on the header.php page.

Syntax: [ Download ] [ Hide ]
<?php
       
        $slideshow = $options['selectinput'];
        // Only show this is the Single Header Image is selected or if no option is set
        if ( $slideshow == 1 || !$slideshow ) {
                // Check if this is a post or page, if it has a thumbnail, and if it's a big one
                if ( is_singular() &&
                                has_post_thumbnail( $post->ID ) &&
                                ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( '950', '425' ) ) ) &&
                                $image[1] >= HEADER_IMAGE_WIDTH ) :
                        // Houston, we have a new header image!
                        echo get_the_post_thumbnail( $post->ID, '950x425' );
                else : ?>
                        <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="<?php bloginfo('name'); ?>" class="headerimg" />
        <?php endif;
        } // End only show if Single Header Image is selected
       
?>


<?php
        if ( is_home() && $paged < 1 ) {
                get_template_part( 'slideshow' );
        }
?>

Hth
EDIT
Make a backup of your template before trying this, and if you remove the given code, it removes the slideshow / image.

_________________
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group