Content in header question (Thanks in advance)
-
I just want to put a video player in the header. I have it there now, but only want to have it show up on the home page.
COuld someone please post the code I would need to put my video player code in so I can have it show up on one page.
I know it hast to do with is_home() , but I’m not sure where to place it in the header or how to write out the exact code for it to work.
Could someone please post an example of how it should look like?
Thank you for your time and have a good evening.
-
There are code examples here:
Thank you, but this was the same answer I was given before and it doesn;t help.
I don’t know who to use the code correctly and thats why I’m begging for just a simple example. The code I’m using is :
<?php
is_home(<iframe src=”http://link.brightcove.com/services/player/bcpid1586371654″ width=”917″ height=”606″ frameborder=”0″ scrolling=”no”></iframe>
)
?>Is that correct? If not, than you see the problem I am having.
Please someone post an example they are currently using.
Thank you and take care.
Can’t anyone help with this?
I haven’t looked at the specifics of what you’re trying to do, but the way to use is_home() is more like this:
<?php if is_home() { ?><iframe src="http://link.brightcove.com/services/player/bcpid1586371654" width="917" height="606" frameborder="0" scrolling="no"></iframe><?php } ?>– Tim
This is what it say when I use the code you supplied
Parse error: syntax error, unexpected T_STRING, expecting ‘(‘ in /home2/xumbalco/public_html/blog1/wp-content/themes/violator-11/header.php on line 52
Please help. Thank you
I’ll need to see the code in context to give any more help. Please copy and paste it with a couple of lines of code immediately before and immediately after. If you could indicate which is line 52 that would help too. Thanks.
– Tim
`<!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 sandbox_blog_lang(); ?>>
<head profile=”http://gmpg.org/xfn/11″>
<title><?php bloginfo(‘name’); if ( is_404() ) : _e(‘ » ‘, ‘sandbox’); _e(‘Not Found’, ‘sandbox’); elseif ( is_home() ) : _e(‘ » ‘, ‘sandbox’); bloginfo(‘description’); else : wp_title(); endif; ?></title><meta http-equiv=”content-type” content=”<?php bloginfo(‘html_type’) ?>; charset=<?php bloginfo(‘charset’) ?>” />
<meta name=”description” content=”<?php bloginfo(‘description’) ?>” />
<meta name=”generator” content=”WordPress <?php bloginfo(‘version’) ?>” /><!– Please leave for stats –>
<meta name=”description” content=”” />
<meta name=”keywords” content=”” />
<meta name=”author” content=”Tri Media Solutions” /><link rel=”stylesheet” type=”text/css” href=”<?php bloginfo(‘stylesheet_url’); ?>” />
<link rel=”alternate” type=”application/rss+xml” href=”<?php bloginfo(‘rss2_url’) ?>” title=”<?php echo wp_specialchars(get_bloginfo(‘name’), 1) ?> <?php _e(‘Posts RSS feed’, ‘sandbox’); ?>” />
<link rel=”alternate” type=”application/rss+xml” href=”<?php bloginfo(‘comments_rss2_url’) ?>” title=”<?php echo wp_specialchars(get_bloginfo(‘name’), 1) ?> <?php _e(‘Comments RSS feed’, ‘sandbox’); ?>” />
<link rel=”pingback” href=”<?php bloginfo(‘pingback_url’) ?>” />
<!–[if lt IE 7.]><script defer type=”text/javascript” src=”<?php bloginfo(‘template_directory’); ?>/pngfix.js”></script><![endif]–>
<?php wp_head() ?>
</head><body class=”<?php sandbox_body_class() ?>”>
<div id=”universe” class=”hfeed”>
<div id=”header”><div id=”header-l”><div id=”header-r”>
<!–<h1 id=”blog-title”>/” title=”<?php bloginfo(‘name’) ?>” rel=”home”><?php bloginfo(‘name’) ?></h1>
<div id=”blog-description”><?php bloginfo(‘description’) ?></embed></div>–><div id=”logo”> <span>“><img src=”<?php bloginfo(‘template_directory’); ?>/images/logo.png” alt=”<?php bloginfo(‘description’); ?>” /></span>
</div><div id=”search”>
<form id=”searchform” method=”get” action=”<?php bloginfo(‘home’) ?>”>
<div>
<input id=”s” name=”s” type=”text” value=”<?php echo wp_specialchars(stripslashes($_GET[‘s’]), true) ?>” tabindex=”1″ />
<input id=”searchsubmit” name=”searchsubmit” type=”submit” value=”” tabindex=”2″ />
</div>
</form>
</div><div id=”menu”>
-
<li id=”m-home” class=”<?php if (((is_home()) && !(is_paged())) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) { ?>current_page_item<?php } else { ?>page_item<?php } ?>”>“><span>Home</span>
<?php wp_list_pages(‘sort_column=menu_order&depth=1&title_li=’); ?></div><!– #menu –>
</div></div></div><?php if is_home() { ?><iframe src=”http://link.brightcove.com/services/player/bcpid1586371654″ width=”917″ height=”606″ frameborder=”0″ scrolling=”no”></iframe><?php } ?>
<!– #header –>Thanks Technokinetics!!!
Please…can I get some help with this?
Thanks
Sorry, my slip-up (it was getting late); the condition needs to be in brackets:
<?php if (is_home()) { ?><iframe src="http://link.brightcove.com/services/player/bcpid1586371654" width="917" height="606" frameborder="0" scrolling="no"></iframe><?php } ?>– Tim
Its Alive!!!!!..kidding. It works fine now.Thank you so much!!!
The topic ‘Content in header question (Thanks in advance)’ is closed to new replies.