hallo,
ich habe folgendes (nettes) mal gefunden und möchte das gerne in mein header.php (benutze das bluebarry boat theme) einbinden, leider gelingt mir das nicht, kenne mich auch mit php jetzt leider nicht so aus.
PHP
<div id="intro"><div style="width:600px;"><h1><a href="<?php bloginfo('url'); ?>">Mein Blog</a><span class="white"> / <?
$random_text = array("Hello World",
"Welcome at home",
"You Know I'm No Good",
"A Less Ordinary Life",
"Wanna be your idol");
srand(time());
$sizeof = count($random_text);
$random = (rand()%$sizeof);
print("$random_text[$random]");
?>!</span></h1></div></div>
Alles anzeigen
hab es folgendermaßen versucht:
PHP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<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() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
<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'); ?>" />
</head>
<body>
<div id="intro"><div style="width:600px;"><h1><a href="<?php bloginfo('url'); ?>">CHARLOTTENBURG</a><span class="white"> / <?
$random_text = array("Hello World",
"Welcome at home",
"You Know I'm No Good",
"A Less Ordinary Life",
"Wanna be your idol");
srand(time());
$sizeof = count($random_text);
$random = (rand()%$sizeof);
print("$random_text[$random]");
?>!</span></h1></div></div>
<div id="img1"></div>
<div id="head">
<h1><a href="<?php echo get_settings('home'); ?>"><?php bloginfo('name'); ?></a></h1>
<h5><?php bloginfo('description'); ?></h5>
</div>
Alles anzeigen
leider sehe ich aber nicht, selbstverständlich habe ich auch den style.css editiert, also den "intro" tag hinzugefügt ..