Random <br /> Instead of Content when using get_posts
-
Problem:
On the home.php page I am usingget_posts
in several places. The first use of it is grabbing the content of a category called Welcome. I know it is working because it is grabbing the correct title. However, when I usethe_content
orthe_excerpt
the content is not being displayed. A random<br />
is.What I have Tried:
I have searched everywhere. Nothing.
I have removed thethe_content
andthe_excerpt
. That removes the<br />
.
Changing the variable name for get_posts does not matter. (unless I did it wrong… ?? )Code:
Here is the code:
<?php $blogposts = get_posts('numberposts=1&category=3'); //Welcome Message foreach($blogposts as $welcome_post) : ?> <div class="post"> <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1> <div class="entry"> <?php the_content(); ?> </div> </div> <?php endforeach;?>
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Random <br /> Instead of Content when using get_posts’ is closed to new replies.