I gave up. I pasted the code below into the top navigation menu. So it will show the premalink to the last blog post entry!
<?php
global $post;
$myposts = get_posts(‘numberposts=1&category=-3’);
foreach($myposts as $post) :
setup_postdata($post);
?>
I wrote what I exactly wanted:
<?php
get_header();
query_posts(‘posts_per_page=1’);
?>
<?php
global $post;
$myposts = get_posts(‘numberposts=1&offset=1&category=-3’);
foreach($myposts as $post) :
setup_postdata($post);
?>
“><?php the_title(); ?>
<?php endforeach; ?>
But the problem is even I wrote to show the last post first, it shows the previous link first! You would think WordPress will executes lines top to bottom.
Tnx for your reply. 🙂
That might work on an index. On a page it won’t show anything.
I want to show the last post with permalink to previous entry inside a page.
Nobody else knows?
Tnx.