Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

next project link WordPress


on my site, there are 3 pages that contain multiple posts. i am building a child theme using thematic.

i need help fixing the next project link that appears on each individual post page, ex:
i want the next project to link to the next post within that category, for example from i want the next project to link to this post

at the last post in the category i would like the "next project" link to be "print projects" (to link to the next page posts).

Answers (3)


Erez S answers:

Already fixed this for him,i had to add the thirst argument of this function and to set it to true

karenmessing comments:

which file did you edit?

the last post on the page doesnt link to the next page.
should say "WEB PROJECTS" where "NEXT PROJECT" appears on the other posts.

Erez S comments:

i edited the single.php and i'll be able to do this for in 5 minutes from now

Erez S comments:

okay,i fixed this,now you need to edit three classes to your css :
web-projects , print-projects , identity-projects
each one is for the links to the categories on the last page in the category

karenmessing comments:

i see the changes but the print projects identity projects and web projects do not link to their respective pages.
print projects should link to this page etc

Erez S comments:

ok,i added the links,now you need to style them with css

Erez S comments:

ok,i did the style for you,now everything works great :)


Utkarsh Kukreti answers:

Could you post the current code used to generate that part of the page?

karenmessing comments:

this is my single.php code

global $options;
foreach ($options as $value) {
if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; }
else { $$value['id'] = get_option( $value['id'] ); }
<?php get_header() ?>

<div id="container">

<div id="project">
<div id="title"> <?php get_custom_field('title', TRUE); ?> </div>
<div id="description"> <?php get_custom_field('details', TRUE); ?> </div>
<div id="singlepostnav">
<div id="count"> <?php get_custom_field('count', TRUE); ?> </div>
<div id="slidenav"> <?php get_custom_field('slidenav', TRUE); ?> </div>


<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_post_link('%link', '<span class="meta-nav"></span> previous project') ?></div>
<div class ="thumbnails"> &#124;</div>

<div class="nav-next"><?php next_post_link('%link', ' <span class="meta-nav">&nbsp;&nbsp;</span>') ?></div>

<div id="post">
<?php the_post(); ?>

<?php thematic_navigation_above();?>

<?php get_sidebar('single-top') ?>
<div id="single">
<?php thematic_singlepost() ?>

<?php get_sidebar('single-insert') ?>

<?php thematic_comments_template(); ?>

<?php get_sidebar('single-bottom') ?>

</div><!-- #content -->
</div><!-- #container -->

<?php thematic_sidebar() ?>
<?php get_footer() ?>


Dan Fraticiu answers:

This should work:
<?php next_post_link('%link', 'Next Project', true); ?>

Later Edit: more precise

<div class="nav-next"><?php next_post_link('%link', ' <span class="meta-nav">&nbsp;&nbsp;</span>', true) ?></div>

Dan Fraticiu comments:

<div class="nav-previous"><?php previous_post_link('%link', ' <span class="meta-nav">&nbsp;&nbsp;</span>', true) ?></div>

<div class="nav-next"><?php next_post_link('%link', ' <span class="meta-nav">&nbsp;&nbsp;</span>', true) ?></div>

Note that if the post is the last in it's category, the link will not show. Also if it's the first previous will not show. Hope that helps.