Display Both next previous and number in single page [duplicate]

If next/prev posts exist, the next/prev button will show. What i did here is to modify the next/prev labels 🙂 while( have_posts() ) : // Your loop endwhile; // Pagination $pagination_args = array( ‘prev_text’ => ‘<i class=”fa fa-chevron-right” aria-hidden=”true”></i>Previous post’, ‘next_text’ => ‘Next post<i class=”fa fa-chevron-left” aria-hidden=”true”></i>’ ); ?> <div class=”paginate_container”><?php echo paginate_links( $pagination_args ); … Read more

Single article separated into multiple pages makes Facebook Like button detect as completely separated articles

You can explicitly set the ‘like’ URL. If you play with the form FaceBook provides you can see how that works. <div class=”fb-like” data-href=”http://example.com” data-send=”true” data-width=”450″ data-show-faces=”true”></div> If you don’t set the URL the default is the current URL, so you will have multiple pages. So, and this is the only WordPress part of this … Read more

Next Page & Previous Page links – skipping a single page – how?

I just tried this and it works for me. Given that you would like to exclude page id 4 this is the code you are looking for. <?php $pagelist = get_pages(‘sort_column=menu_order&sort_order=asc&exclude=4’); $pages = array(); foreach ($pagelist as $page) { $pages[] += $page->ID; } $current = array_search($post->ID, $pages); $prevID = $pages[$current-1]; $nextID = $pages[$current+1]; ?> <div … Read more

alternative to wp_link_pages() that only shows link to last page

Crib a bit of code from wp-includes/query.php and bit from wp-includes/post-template.php, add a little, mix and stir, and… function url_to_last_page() { global $post; $content = str_replace(“\n<!–nextpage–>\n”, ‘<!–nextpage–>’, $post->post_content); $content = str_replace(“\n<!–nextpage–>”, ‘<!–nextpage–>’, $content); $content = str_replace(“<!–nextpage–>\n”, ‘<!–nextpage–>’, $content); $pages = explode(‘<!–nextpage–>’, $content); $numpages = count($pages); $ret = _wp_link_page($numpages); $ret .= $numpages; $ret .= ‘</a>’; return … Read more

Give wp link pages it’s own template

In your single.php add this example code inside the loop: <?php global $page; if ($page == 1) {?> <div style=”color:red;”>This text should only appear on first page of the post!!!</div> <?php } ?> you can change the div with your thing that you wanted to display only on the first post page..

Widget background images missing on second blog excerpt page

If you look at your browser’s error console, you’ll see the 404 errors for your background images, which will point to where the issue is. This URL: ../wp-content/themes/themename/images/cat-party.jpg basically says, “go up one directory from the current directory, then from there look in wp-content, then themes, then images, etc..”. That works fine on the front … Read more