macart
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Random ImageMy Bad. Thanks very much for all the help!
Forum: Fixing WordPress
In reply to: Random Imageimage_2.jpg will show up eventually if I refresh several times. The rest of the time, the area is blank.
Forum: Fixing WordPress
In reply to: Random ImageNO ERRORS! But still not working.
Forum: Fixing WordPress
In reply to: Random Imagesorry newbie mistake
Forum: Fixing WordPress
In reply to: Random ImageNO ERRORS! With this functions.php code.
<?php
if ( function_exists(‘register_sidebar’) )
register_sidebar(array(
‘before_widget’ => ‘<div class=”sidepanel”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h3>’,
‘after_title’ => ‘</h3>’,
));
?>
<?php
function randnum() {
// Range creates an array from a range (in this case 1 – 10)
$b = range(1,10);
// So the array looks like – array(1,2,3,4,5,6,7,8,9,10)
shuffle($b);
$r = array_values($b);
echo $r[rand(1,10)];
}
?>Forum: Fixing WordPress
In reply to: Random ImageRemoved output buffering.
Nice Catch! wp-config.php did have a white space at bottom. Corrected that and uploaded. Added code again to functions.php, slammed same errors.
Not sure how to find line 784 and 785? Page source is only 100 lines of code.
Forum: Fixing WordPress
In reply to: Random ImageTried it again this am, got the same errors above and this one:
function randnum() { // Range creates an array from a range (in this case 1 – 10) $b = range(1,10); // So the array looks like – array(1,2,3,4,5,6,7,8,9,10) shuffle($b); $r = array_values($b); echo $r[rand(1,10)]; }
Forum: Fixing WordPress
In reply to: Random ImageThanks again for everyones help. Wondering if anyone can get the image rotation described above to work on 2.8.1, or is it just me.
Forum: Fixing WordPress
In reply to: Random ImageI followed the instructions above, placing above the header and below the footer. Slammed same exact errors! Is this a 2.8.1 bug?
Forum: Fixing WordPress
In reply to: Random ImageThanks again for the help.
I removed the bottom ?>
Got slammed with same errors.Forum: Fixing WordPress
In reply to: Random ImageMy header code for the fun of it.
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”https://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
<title><?php if (is_home () ) {
bloginfo(‘name’);
} elseif ( is_category() ) {
single_cat_title(); echo ‘ – ‘ ; bloginfo(‘name’);
} elseif (is_single() ) {
single_post_title();
} elseif (is_page() ) {
bloginfo(‘name’); echo ‘: ‘; single_post_title();
} else {
wp_title(”,true, left);
} ?>
</title><link href=”<?php bloginfo(‘stylesheet_url’); ?>” rel=”stylesheet” type=”text/css” />
<link href=”<?php bloginfo(‘pingback_url’); ?>” rel=”pingback” />
<?php wp_head(); ?>
</head><body class=”twoColFixRtHdr”>
<div id=”container”>
<!– end #header –></div>Forum: Fixing WordPress
In reply to: Random ImageThanks for the help.
My functions.php
<?php
if (function_exists(‘register_sidebar’))
register_sidebar();?><?php
function randnum() {
// Range creates an array from a range (in this case 1 – 10)
$b = range(1,10);
// So the array looks like – array(1,2,3,4,5,6,7,8,9,10)
shuffle($b);
$r = array_values($b);
echo $r[rand(1,10)];
}
?>Got this:
Warning: Cannot modify header information – headers already sent by (output started at /home/content/html/wordpress/wp-content/themes/mytheme/functions.php:5) in /home/content/m/a/c/macart/html/wordpress/wp-includes/functions.php on line 784
Warning: Cannot modify header information – headers already sent by (output started at /home/content/html/wordpress/wp-content/themes/mytheme/functions.php:5) in /home/content/html/wordpress/wp-content/themes/mytheme.php on line 785
Forum: Fixing WordPress
In reply to: Random ImageThanks for everyone for the help, I know this is not that complicated, but still not working.
As soon as I put this in my functions.php:
<?php function randnum() {
// Range creates an array from a range (in this case 1 – 10)
$b = range(1,10);
// So the array looks like – array(1,2,3,4,5,6,7,8,9,10)
shuffle($b);
$r = array_values($b);
echo $r[rand(1,10)];
}
?>I got this:
Warning: Cannot modify header information – headers already sent by (output started at /home/content/html/wordpress/wp-content/themes/mytheme/functions.php:6) in /home/content/html/wordpress/wp-includes/functions.php on line 784
Warning: Cannot modify header information – headers already sent by (output started at /home/content/html/wordpress/wp-content/themes/mytheme/functions.php:6) in /home/content/html/wordpress/wp-includes/functions.php on line 785
Forum: Fixing WordPress
In reply to: Random ImageThanks for the responses.
I tried this:
<div id=”contentBanner”><img src=”rotate.php” alt=”Rotating Image” width=”788″ height=”250″ /></div>
}
#contentBanner {
height: 250px;
width: 788px;
background: url(images/rotate);
float: left;
margin-top: 10px;
margin-bottom: 20px;
}I just have a big blank box that says “Rotating Image”
Thanks for any help