Ok Im using this Code: <?php if(is_home()) : ?> <h1><a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a></h1> <?php else : ?> <span id="blogTitle"> <a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a> </span> <?php endif; ?> On My wordpress blog...
If statement PHP.. Wordpress
5
Ok Im using this
On My wordpress blog...
My homepage is a static wordpress page, so I need the blog title to be at least included on that page.
It includes my blog title but doesnt put it in the code on that page or any other page.
it's good that it's removed everything from my other pages as now I have a nice clean <H1>
But for the homepage I want it to at least include this, any ideas..
What I do to that code to make it right?
Oh the homepage is set via General settings in wordpress back office, so that it is the statci page I've selcted it to be.
It is called home but i guess the if statement is wrong because it isn't picking it up.
Cheers
Code:
<?php if(is_home()) : ?>
<h1><a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a></h1>
<?php else : ?>
<span id="blogTitle">
<a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a>
</span>
<?php endif; ?> My homepage is a static wordpress page, so I need the blog title to be at least included on that page.
It includes my blog title but doesnt put it in the code on that page or any other page.
it's good that it's removed everything from my other pages as now I have a nice clean <H1>
But for the homepage I want it to at least include this, any ideas..
What I do to that code to make it right?
Oh the homepage is set via General settings in wordpress back office, so that it is the statci page I've selcted it to be.
It is called home but i guess the if statement is wrong because it isn't picking it up.
Cheers
- tunasalad
- esoomllub
- [ 1 ] Thanks
- esoomllub
- [ 1 ] Thanks
Next Topics on Trending Feed
-
5