vivalazebra
Forum Replies Created
-
Forum: Themes and Templates
In reply to: header images on different pagesokay so I made on each page custom field BodyClass and the value is whatever it correlates to like Contact, Pictures etc…
Then I changed your code to the following…
<body<?php if ($BodyClass) echo ‘ class=”‘ . $BodyClass . ‘”‘; ?>>
which I think isn’t right…
then I went into the stylesheet to change the header image on the contact page and entered:
.BodyClass #contact { background: url(‘images/zebra_header.jpg’) no-repeat; }
But no love… any suggestions of what I messed up ?? thanks
Forum: Themes and Templates
In reply to: header images on different pagesThank you for your patience on this,
So Im using permalinks with page id’s so for example my contact page is ?page_id=17
with your code in place when I go to my stylesheet and add the code would it need to look like this….?page_id=17 #pic { background: url(‘images/zebra_header_3.jpg’) no-repeat; }
also in my header file it looks like this with you code in place will it not work with the other code below it?
<?php wp_head(); ?>
</head>
<?php
$page = ”;
if (is_front_page() ) {
$page = ‘home’;
} elseif (is_page()) {
$page = $wp_query->query_vars[“pagename”];
}
?>
<body<?php if ($page) echo ‘ class=”‘ . $page . ‘”‘; ?>><div id=”container”>
<div id=”page” class=”blog”>
<div id=”header”>
<h1>“><?php bloginfo(‘name’); ?></h1>
<div id=”nav”></div>
<div id=”pic”></div>
</div>Thanks again dont mean to seem thick headed Im normally a quick learner just the pressrow code is kinda jumbled.
Forum: Themes and Templates
In reply to: header images on different pagesWith the code you sent
<?php
$page = ”;
if (is_front_page() ) {
$page = ‘home’;
} elseif (is_page()) {
$page = $wp_query->query_vars[“pagename”];
}
?>
<body<?php if ($page) echo ‘ class=”‘ . $page . ‘”‘; ?>>Do I need to alter anything in the code? Or just update my CSS… for example say I made a pictures link and the page id is 12
do I enter this into my css to change the header image?
.pictures #pic { background: url(‘images/zebra_header_mid.jpg’) no-repeat; }
thanks for your help and sorry still new to css and php.
Forum: Themes and Templates
In reply to: header images on different pagesThanks stvwlf, can you look at my header code below and let me know where I should place it
<?php wp_head(); ?>
</head>
<body <?php if (function_exists(‘body_class’)) body_class(); ?>><div id=”container”>
<div id=”page” class=”blog”>
<div id=”header”>
<h1>“><?php bloginfo(‘name’); ?></h1>
<div id=”nav”></div>
<div id=”pic”></div>
</div>Do I just take out —
<body <?php if (function_exists(‘body_class’)) body_class(); ?>>