WordPress.org

Ready to get started?Download WordPress

Forums

before and after links, where to chang the (more...) copy (5 posts)

  1. ScottHaneda
    Member
    Posted 9 years ago #

    Two quick ones I can not find with search, how can I create
    « title of previous post  |   Main   |   title of next post » style links on each blog posts page, much like DB does in MT here: http://www.drunkenblog.com/drunkenblog-archives/000515.html

    I also use the "more" feature a lot, and would like to change the (more...) to say something like continue reading... anyone know where that change is made at?

  2. Minna
    Member
    Posted 9 years ago #

    For the 1st question, see previous_post and next_post template tags. <?php bloginfo('url'); > returns the url for the Home link.

    As for the 2nd question, see the examples for the_content tag.

    (Sorry for providing just links but I'm an avid Codex fan and I feel that people should be directed towards it. Hope you can build up the rest. If not, ask for more :) )

  3. Root
    Member
    Posted 9 years ago #

    I second the Codex thing. Folks are working hard there and it can only benefit us if its supported. Plus it cuts down repetetive answers in the forum. Its our resource - lets celebrate it.

  4. ScottHaneda
    Member
    Posted 9 years ago #

    I have tried the previous_post and next_post tags, I seem to get a sql error no matter where I put them, can someone show me a real example and a posting location to get it to work? I also think I need to have it in a conditional so I can tell it to only show on the blog post, and not on the main page where multiple blog posts are listed.

  5. Minna
    Member
    Posted 9 years ago #

    well, if you have a Post template (single.php) you can put it there without any conditionals. But if you're not using post template, you can put a <?php if ( is_single() ) { ?> <?php } ?> somewhere

    Here's a cleaned code snippet off my single.php. The first line's just to show some context, that is, the functions should be used inside the Loop:
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php previous_post('&laquo; %','Previous entry','no') ?>
    <?php next_post('% &raquo;','Next entry','no') ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.