I would like to have a static welcome message at the top of my blogs frontpage. Like a static entery at the top of the page or something like that. Is it possible? How?
Niels
I would like to have a static welcome message at the top of my blogs frontpage. Like a static entery at the top of the page or something like that. Is it possible? How?
Niels
One way is to put something before The Loop.
The top of your main index.php will be something like this:
<?php
get_header();
?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
so putting some thing between those will effectively look like a sticky / message:
<?php
get_header();
?>
<div id="message">
Hi, this is a welcome message
</div>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
and then in the css:
#message {
width:300px;
margin: 0 auto;
border: 2px solid #ff0000;
background-color:#ccc;
color:#00ff00;
}
should get somewhere close ?
If you only want it on the front page add:
<?php if(is_home()) { ?>
...
<?php } ?>
around the div.
This topic has been closed to new replies.