Comments on: Conditional page/post navigation links in WordPress http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress/ Wed, 03 Mar 2010 22:39:35 -0800 http://wordpress.org/?v=2.8.6 hourly 1 By: Eric Martin http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress/#comment-8223 Eric Martin Mon, 04 May 2009 15:55:15 +0000 http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress/#comment-8223 @David - Have you checked out the updated version of this concept? @David - Have you checked out the updated version of this concept?

]]>
By: David Swain http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress/#comment-8203 David Swain Sun, 03 May 2009 02:27:30 +0000 http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress/#comment-8203 Hi I would like to use this function, or a variant of it but i cant get it working, basically i am using previous_post_link() as follows: <code> $img = "<img src=\"/image/galleries/" . $catnicename . "/" . $image ."\" alt=\"" . get_the_title() . "\" />"; if (previous_post_link('%link', $img, TRUE) == Null) { echo $img; } else { previous_post_link('%link', $img, TRUE); } </code> which works great inless there is a previous_post_link in which case it prints the link with the $img variable inbetween the >a href tags (which is what i want, and then the $img again. I am thinking the solution is in your code here somewhere but i cant find it, could you help me out? David Hi

I would like to use this function, or a variant of it but i cant get it working, basically i am using previous_post_link() as follows:


$img = "<img src=\"/image/galleries/" . $catnicename . "/" . $image ."\" alt=\"" . get_the_title() . "\" />";

if (previous_post_link('%link', $img, TRUE) == Null) {
echo $img;
} else {
previous_post_link('%link', $img, TRUE);
}

which works great inless there is a previous_post_link in which case it prints the link with the $img variable inbetween the >a href tags (which is what i want, and then the $img again.

I am thinking the solution is in your code here somewhere but i cant find it, could you help me out?

David

]]>
By: Infinite Scrolling: Adeus, links de navegação! | The Back-up Brain Weblog http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress/#comment-4451 Infinite Scrolling: Adeus, links de navegação! | The Back-up Brain Weblog Sun, 16 Nov 2008 02:46:26 +0000 http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress/#comment-4451 [...] possuía essa navegação embutida. Assim que reparei nesse problema, pensei imediatamente não em criá-los no rodapé, mas sim, em fazer uso do excelente plugin WP-PageNavi, que, no caso do modelo de índice do blog, [...] [...] possuía essa navegação embutida. Assim que reparei nesse problema, pensei imediatamente não em criá-los no rodapé, mas sim, em fazer uso do excelente plugin WP-PageNavi, que, no caso do modelo de índice do blog, [...]

]]>
By: Eric Martin http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress/#comment-125 Eric Martin Thu, 17 Jan 2008 20:42:58 +0000 http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress/#comment-125 @Naif - this code was deprecated in favor of a <a href="http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress-redux/" rel="nofollow">different approach</a>. However, you did find something that must have been garbled when posting: <code>$nextpage = intval($paged) 1;</code> should be: <code>$nextpage = intval($paged) + 1;</code> which makes <code>$nextpage <= $max_page</code> correct. I've updated the page and will put a note about this approach being replaced. @Naif - this code was deprecated in favor of a different approach. However, you did find something that must have been garbled when posting:

$nextpage = intval($paged) 1;

should be:

$nextpage = intval($paged) + 1;

which makes $nextpage < = $max_page correct. I've updated the page and will put a note about this approach being replaced.

]]>
By: Naif http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress/#comment-124 Naif Thu, 17 Jan 2008 18:11:46 +0000 http://www.ericmmartin.com/conditional-pagepost-navigation-links-in-wordpress/#comment-124 Hi. I think there are two bugs here... I believe <code>$nextpage <= $max_page</code> should actually be <code>$nextpage < $max_page</code> And why is there a 1 at the end on the following line: <code>$nextpage = intval($paged) 1; </code> Hi. I think there are two bugs here... I believe

$nextpage <= $max_page

should actually be

$nextpage < $max_page

And why is there a 1 at the end on the following line:

$nextpage = intval($paged) 1;

]]>