- This topic is empty.
-
AuthorPosts
-
April 3, 2010 at 4:26 pm #28616kloyMember
Ok, I’m trying to get a flash banner to play on the home page.
On all the other pages I’m want a set of random images to appear in the header. So I’m trying to create somekind of conditional statement. Both work individually. But I can’t seem to get the conditional statement to work….So I am trying to say—If at home use this html, if else , use this other html codeCode:MakeshiftMemberAlright, a few problems here.
I see you’re using the colons ‘:’ and the brackets ‘{‘ ‘}’.
You can’t use both on the same statement.When using the colons, here is how it would go…
Code:if($foo == $bar):
do_someting();
elseif:
do_something_else();
endif;When using the brackets…
Code:id($foo == $bar){
so_something();
}else{
so_something_else();
}So, in this particular code, this isn’t your only problem…
When using these statements as you are, it’s best not to echo the codes…
Code:
April 4, 2010 at 11:24 am #73429kloyMemberThanks,
Though the flash banner is not playing on the home page.
Does <?php if(is_home()) looking for an index page.I’m doing all this in a wordpress theme and created a subfolder/staging before it goes live. So right now there is no index page.
http://www.newseminary.org/staging/berke14q_wrdp/April 4, 2010 at 11:30 am #73430kloyMemberI figured it out. instead of using is_home() I’m using
is_front_page()and now it works the way I want it to
Thanks for your help!!April 4, 2010 at 1:46 pm #73444MakeshiftMemberParse error: syntax error, unexpected T_ENDWHILE in /home/berke14q/public_html/staging/berke14q_wrdp/wp-content/themes/StudioBlue/StudioBlue/page.php on line 63
Ya might wanna get that taken care of…
No problem, that’s why we’re here!
April 4, 2010 at 2:33 pm #73445kloyMemberOh, that error is referring to was referring to this….
I’m also trying to get the home page to display sub page and am having some problems with now…
I got this $pages code off the wordpress site…I’m not sure where to put it. I tried putting it the div with the content but it’s not working.If you go to the page now you won’t get that same error. The page will load but the sub pages don’t show up??
Code:
” rel=”bookmark” title=”Permanent Link to “>
ID.’&sort_column=post_date&sort_order=desc’);
$count = 0;
foreach($pages as $page)
{
$content = $page->post_content;
if(!$content)
continue;
if($count >= 2)
break;
$count++;
$content = apply_filters(‘the_content’, $content);
?>ID) ?>”>post_title ?>
No Results Found
The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.
AuthorPostsViewing 6 posts - 1 through 6 (of 6 total)- The forum ‘Back End’ is closed to new topics and replies.