My php link is double posting in the browser
-
I’m sure this is a pretty easy php fix, but unfortunately I am new to php and am dumbfounded since this code snippet was working earlier.
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
- ” rel=”bookmark”><?php the_title(); ?>
<?php the_date(); echo “
“; ?>
<?php endwhile; else: ?>
<?php endif; ?>Currently it is calling the right page, but pasting it twice in the browser. Does anyone have any suggestions for a fix?
Also I was wondering how I could take this code and have it call the most recent posts, currently it is going from oldest to most recent. Thank you php geniuses!
<?php
$posts = get_posts(‘numberposts=10&order=ASC&orderby=post_title’);
foreach ($posts as $post) : start_wp(); ?>
<p class=”title”><?php the_date(); echo “
“; ?></p>
<h2> ” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>
<?php the_excerpt(); ?>
Main Link to: ” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?>
<div class=”line”></div>
<?php
endforeach;
?>Thanks again, any help is appreciated.
- ” rel=”bookmark”><?php the_title(); ?>
- The topic ‘My php link is double posting in the browser’ is closed to new replies.