hallo,
ich möchte mein header bild wechseln und bei einer statischen page eine flash header laufen lassen (das mit dem flash header funktioniert) aber der rest nicht wie gehe ich am besten vor
hier mein stylesheet:
/*
Theme Name: CoffeeSpot
Version: 1.3
Description: CoffeeSpot is yet another wordpress theme by <a href="[url=http://wpthemepark.com]WordPress Theme Park[/url]" title="WP ThemePark">WP ThemePark</a>.
Author: Sadish Bala
Author URI: [url=http://wpthemepark.com]WordPress Theme Park[/url]
*/
/* Header image courtesy of [url=http://www.sxc.hu/photo/712538]stock.xchng - Time for a coffee break (stock photo by sofijab)[/url] */
/* Section: Body --------- */
body {
margin: 0;
padding: 0;
font-family: Verdana,Tahoma, Arial, Serif;
line-height: 1.5em;
font-size: 10px; /* IE5 Win */
voice-family: "\"}\"";
voice-family: inherit;
font-size: 10px; /* easy scaling */
font-size: 0.76em;
background-image: url(img/bg.gif);
color:#333;
}
/* Sub-Section: Body Paragraph and Links --------- */
p, li {
margin: 0.5em 0 0.7em;
line-height:1.8em;
}
a {
text-decoration: none;
}
a:link
{
color: #a66349;
border-bottom:1px dashed;
background:none;
}
a:visited {
color: #b7745a;
border-bottom:1px dashed;
background:none;
}
a:hover, a:active {
border-bottom:#aba195 1px solid;
background:#fffaf0;
color: #993333;
}
abbr, acronym {
font-style: normal;
border-bottom: 1px dotted;
}
abbr[title]
{
cursor:help;
}
blockquote{
margin: 1em;
padding: 1em;
border-left: 2px solid #ccc;
color:#666;
}
dl dt
{
font-weight:bold;
margin:5px 0;
}
dl dd
{
padding-left:20px;
display:inline;
}
fieldset
{
border:none;
}
img
{
border:#b7745a 1px solid;
}
img.wp-smiley, img.noborder
{
border:none;
}
img.right
{
float:right;
text-align:right;
padding:5px;
margin:100px 0 0;
}
img.left
{
float:left;
text-align:left;
padding:5px;
margin:0 1em 1em;
}
#rap {
margin: 0 auto;
padding:0;
background:#fff url(img/sidebarbg.gif) repeat-y right;
/* box model hack */
width: 780px;
voice-family: "\"}\"";
voice-family: inherit;
width: 780px;
}
html>body #rap { /* be nice to Opera */
width: 780px;
}
/* Sub-Section: FONTS --------- */
h1,h2,h3,h4,h5,h6
{
margin: 0;
padding:0;
font-family: 'Frutiger Linotype', 'Lucida Grande', 'Trebuchet MS', sans-serif;
font-weight:normal;
color: #567;
}
h2,h3
{
line-height:1.4em;
font-size: 1.6em;
border-bottom:#eaeaea 1px solid;
}
/* Section: Positioning --------- */
#header {
height: 165px;
margin:0 auto;
padding:0;
}
#header h1
{
font-size:2em;
margin:10px 0 0 10px;
}
#header h1 a:link,#header h1 a:visited
{
border-bottom:none;
background:none;
}
#header h1 a:hover,#header h1 a:active
{
border-bottom:#fff 1px solid;
background:none;
}
#header h4
{
font-size: 1.1em;
font-style:italic;
margin: 5px 0 0 10px;
padding:0;
}
#header *
{
color:#eee;
}
#main {
float: left;
width: 568px;
padding: 0;
margin: 0;
}
#main ul
{
margin:1em;
padding:0;
list-style:none;
}
#main ul li
{
list-style-image:url(img/coffee-icon.jpg);
padding:3px 0;
margin:0 1em;
}
.post
{
margin:0 0 20px 0;
padding:10px 10px 0;
background:url(img/cup2.jpg) no-repeat top left;
}
.post-title
{
margin-left:75px;
}
.post-title a:link, .post-title a:hover, .post-title a:visited, .post-title a:active
{
border-bottom:none;
}
.day-date {
font-size: 0.9em;
color: #999;
padding: 3px 0;
margin: 0 0 0 75px;
}
.day-date em
{
font-style:normal;
color:#666;
}
.day-date a
{
border-bottom:none;
}
.post-content h4
{
font-size:1em;
font-weight:normal;
margin:0;
padding:0;
font-family:Verdana, Arial, Serif;
}
.post-content h4 em
{
font-style:normal;
float:right;
font-weight:normal;
}
.post-info {
font-size : 0.9em;
color : #666;
margin : 0;
background:url(img/comments-small.gif) no-repeat left center;
padding-left:12px;
border-bottom:#eaeaea 1px solid;
clear:both;
}
.post-info a
{
border-bottom:none;
}
.post-content {
padding:10px;
}
#sidebar {
float: left;
width: 190px;
padding:10px;
line-height:1.3em;
}
#sidebar ul
{
list-style: none;
}
#sidebar form, #sidebar .block, #sidebar ul
{
margin:0;
padding: 1em;
font-size: 0.9em;
background:#DBDBDB;
color: #80664D;
}
#sidebar ul ul
{
margin:0;
padding:0;
}
#sidebar ul li
{
list-style-image:none;
margin:0 10px;
padding:3px 0;
}
#sidebar ul li ul li
{
list-style-image:url(img/arrow.gif);
margin:0 10px;
padding:3px 0;
}
#sidebar a {
color: #80664D;
text-decoration: none;
border:none;
}
#sidebar a:visited
{
color: #80664D;
}
#sidebar a:hover
{
color: #60462d;
border-bottom:1px solid;
}
#sidebar ul img {
border:#459; 0px solid;
}
#sidebar ul ul
{
margin:5px;
font-size:1em;
}
#sidebar h2
{
margin:20px 0 0 0;
font-size: 1.3em;
color: #fff;
height:20px;
border:none;
font-variant:small-caps;
font-weight:bold;
padding:3px 10px;
background:url(img/sideh2.gif) no-repeat top center;
}
#sidebar li h2
{
background:none;
color:#996666;
border-bottom:#996666; 1px solid;
padding:0;
margin:0;
}
#sidebar ul li.feed
{
list-style:none;
background:url(img/feed.png) no-repeat left center;
padding-left:18px;
margin:0;
}
#footer {
clear: both;
margin:0 auto;
background:#410000;
border:#8b4513 0px solid;
color: #ddd;
font-size: 0.9em;
padding:5px;
}
#footer p {
line-height: 1.1;
}
#footer strong
{
color:#fff;
font-size:1.4em;
}
#footer ul
{
margin:0;
padding:0;
}
#footer ul li
{
list-style:none;
padding-left:15px;
background:url(img/arrow.gif) no-repeat left center;
}
#footer div
{
float:right;
width:25%;
}
#footer a
{
color:#ddd;
text-decoration:none;
border:none;
}
#footer a:hover
{
color:#fff;
border-bottom:#fff 1px solid;
background:none;
}
#comments, #respond{
margin: 2em 0 0 5px;
}
#commentform
{
margin:10px;
padding:10px;
}
#rap .commentlist {
margin: 0 1em;
padding: 0;
}
.commentlist li
{
list-style:none;
padding: 1em;
margin:0.5em 0;
background:#eeeee9;
}
.commentlist li.alt
{
background:#f4f4f4;
}
.commentlist li .cmtinfo
{
font-size:1em;
}
.commentlist li cite
{
font-style:normal;
font-weight:bold;
}
.commentlist li .cmtinfo em
{
float:right;
margin:0;
padding:0;
font-style:normal;
font-size:0.9em;
color:#999;
}
.nocomments
{
padding-left:10px;
}
fieldset{
border: none;
}
.field label{
display: block;
}
textarea{
width: 90%;
height: 20em;
border: 1px solid #ccc;
background:#f4f4f4;
}
input.textbox{
border: 1px solid #ccc;
background:#f4f4f4;
}
input.textbox:focus, textarea:focus
{
background:#f9f9f9;
border:#aaa 1px solid;
}
/* Navigation */
#gnav
{
list-style:none;
margin:0 auto;
padding:0 0 3px 0;
background:#590000;
border-bottom:#886b6d 0px solid;
font-variant:small-caps;
font-family:'Frutiger Linotype', 'Lucida Grande', 'Trebuchet MS', sans-serif;
font-weight:bold;
text-align:right;
font-size:1.2em;
}
#gnav li
{
list-style:none;
display:inline;
margin:0;
padding:0 10px;
}
#gnav li a:link, #gnav li a:visited
{
color:#ccc;
text-decoration:none;
padding:4px 0;
border-bottom:none;
background:none;
}
#gnav li a:hover, #gnav li a:active
{
border-bottom:#eee 2px solid;
color:#fff;
background:none;
}
#gnav li.current_page_item a:link, #gnav li.current_page_item a:visited, #gnav li.current_page_item a:hover, #gnav li.current_page_item a:active
{
border-bottom:#eee 2px solid;
color:#fff;
}
/* Section: Misc --------- */
#header, #main,#content, #sidebar, #footer, .widget {
overflow: hidden;
}
Alles anzeigen
hier meine header.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html xmlns="[url=http://www.w3.org/1999/xhtml]XHTML namespace[/url]">
<head profile="[url=http://gmpg.org/xfn/11]XFN 1.1 profile[/url]">
<title><?php bloginfo('name'); ?><?php wp_title();?></title>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<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 wp_get_archives('type=monthly&format=link'); ?>
<?php //comments_popup_script(); // off by default ?>
<?php wp_head(); ?>
</head>
<body>
<div id="rap">
<ul id="gnav">
<li <?php if(is_home()){echo 'class="current_page_item"';}?>><a href="<?php bloginfo('siteurl'); ?>" title="Home"></a></li>
<?php wp_list_pages('title_li=&depth=1')?>
</ul>
<div id="header">
<?php if (is_page('17')) { ?>
<object width="720" height="165" data="[URL]http://localhost/wordpress/wp-content/themes/coffeespot/img/header6.swf[/URL]" type="application/x-shockwave-flash">
<param name="movie" value="[URL]http://localhost/wordpress/wp-content/themes/coffeespot/img/header6.swf[/URL]">
</object>
<?php } ?>
</div>
Alles anzeigen
wie geht meine abfrage weiter also wenn nicht page 17 sondern z.B. 18 soll header 16.jpg geladen werden....wie bewerstellige ich das in der header.php und was muss ich in dem stylesheet ändern....
ich habe gehört ich sollte eine neue class unter header im stylstheet anlegen....
würde das dann im stylesheet z.B. so heißen:
header.heder6 {
background:#630 url(img/header6.jpg) no-repeat right top;} und wie rufe ich das dann in der header.php unter dem div wo ja schon meine swf aufgerufen wird auf?Ich blicke nicht mehr durch...