wp_link_pages Next/Prev Links in Separate Divs?
-
Hello,
I’m modifying a WordPress template’s next/previous links for paginated posts. At the bottom of the post, I’d like it to show, a left-aligned “Go Back” (when applicable) and then, on the same line a right-aligned “Continue Reading” (again, when applicable). In order to do this, I presume I need these links in separate divs. Using wp_link_pages, I can see that I can customize the text, but I don’t see how to put them into separate divs.
I thought perhaps I could also call the function twice and suppress “next” and “previous” in each call respectively.
Here’s what I have so far, with both links appearing in the same div:
<?php wp_link_pages( array( 'before' => '<div class="page-link-next-prev">', 'after' => '</div>', 'next_or_number' => 'next', 'nextpagelink'=> __('Continue Reading'), 'previouspagelink' => __('Go Back') ) );?>
Is there a way I can make this happen with the “stock” wp_links_pages function? Or will I need to create a new function for this?
Thanks,
Matt Richardson
- The topic ‘wp_link_pages Next/Prev Links in Separate Divs?’ is closed to new replies.