Recent posts linking to another site?
-
I’m using the following code:
<div class="news-sidebar"> <h3 class="news-sidebarHeader1">News</h3> <ul class="news-sidebarNews"> <?php $posts = get_posts('category=4&numberposts=4&order=DESC'); foreach ($posts as $post): ?> <li><span class="redbold"> <?php echo date("M j Y", strtotime($post->post_date)); ?></span><br /> <a href="<?php echo $post->guid; ?>"> <?php echo $post->post_excerpt; ?></a> </li> <?php endforeach; ?> </ul> <h3 class="news-sidebarHeader2"> Upcoming Events</h3> <ul class="news-sidebarNews"> <?php $posts = get_posts('category=3&numberposts=4&order=DESC'); foreach ($posts as $post): ?> <li><span class="redbold"><?php echo $post->post_title; ?> </span><br /><a href="<?php echo $post->guid; ?>"><?php echo $post->post_excerpt; ?></a></li> <?php endforeach; ?></ul> </div>
Its completely functioning, but when I click the link, for some reason I am taken to another website (where the website was originally hosted) instead of the post on my current website.
Any Ideas?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Recent posts linking to another site?’ is closed to new replies.