• I am working on customizing a theme that has a static front page but displays a few of the most recent posts in the sidebar. Then I would like to have a blog page which lists all of the posts and has a different sidebar with archives, etc. I have found some solutions that I think will work but my main problem/question is a s follows…

    How do I link the recent posts on the static front page to blog page (creating a similar effect as named anchors) instead of just displaying the single post?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’m not sure, but is it possible to make the Recent Posts echo just the text of the titles, and not have them come out as auto-generated permalinks to the posts?

    If yes then you can just go in your template and put your
    <a href="YOUR BLOG PAGE LINK">
    around that section of code

    Sorry I cannot answer how to echo just the recent post titles without them being permalinks, someone will know how

    Thread Starter joepreston

    (@joepreston)

    I’m not sure, but is it possible to make the Recent Posts echo just the text of the titles, and not have them come out as auto-generated permalinks to the posts?

    How do you echo the text of the titles?

    Thread Starter joepreston

    (@joepreston)

    anyone have any ideas?

    someone should know how to do this?

    i don’t think it is crazy hard?

    If I’m understanding you correctly, you could try this;

    <?php query_posts('showposts=n'); ?> 
    
       // where n = number of posts titles you want to display
    
    <ul>
       <?php while (have_posts()) : the_post(); ?>
    
       <li>
       <a href="<?php echo get_permalink() ?>" ><?php the_title(); ?></a><br />
       </li>
    
    // or <a href="<?php the_permalink() ?>"> both the same
    // result
    
       <?php endwhile;?>
    </ul>

    This will display the title as an anchor to the appropriate post, when clicked, will be displayed using the single.php page without a sidebar.

    Just a thought, but you may want to add the date in there also…
    check out

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Static front Page issue’ is closed to new replies.