All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
1answer
17 views

How do I make a custom “Read More Blogs” button for my blog page

I'm actually working on my custom wordpress theme. And, when I tried to develop a "Read More Blogs" button, I was unable. Because, all the examples I saw on internet was for pagination. I need a ...
0
votes
1answer
35 views

Remove pagination if search returns empty

I made a fix that when the searchbar is empty, it returns 'No results', instead of all posts, but the pagination still shows up. Does anyone know a fix for that? My code search.php: <div class="...
0
votes
1answer
28 views

Pagination 404 error(I have refreshed the permalinks and tried several previous options)

I am using pagination in wordpress, the truth is that I have used it several times. But this time, when I access page number 2, I get an error 404. I've searched a bit and I've tried several functions,...
1
vote
1answer
92 views

Dropdown menu on custom page with product to choose number of products per page

I have almost zero knowledge with Wordpress and Wocoommerce cores and api's so, please bear with me. I have showing ~140 products on custom page (e.g. not the default shop page for woocommerce) ...
0
votes
1answer
85 views

Modifying the_posts_pagination from within functions.php instead of template files

I know that using a function like the following (in functions.php) allows me to customize pagination options: function custom_theme_pagination(){ global $wp_query; echo paginate_links(); } ....
0
votes
0answers
17 views

Last Page or First Page Pagination

How can I make a first page and last page link? $pagination = paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?...
0
votes
1answer
148 views

I want to customize the_posts_navigation function by replacing prev and next with images

Hie, I am currently trying to customize the function 'the_posts_navigation' of Wordpress because I would like to let appear only "previous" and "next" (which I want to replace by icons of arrow in ...
0
votes
0answers
45 views

How to modify the code to include “rel=next” and “rel=prev” tags?

I have a Wordpress site with some posts splitted in pages. I added post pagination via this code: Single.php: <?php wp_link_pages(array( 'before' => '<div class="page-links"><span ...
0
votes
0answers
125 views

How can I get my pagination loop to display the correct number of total pages?

Currently my pagination is showing 7 posts on the first page and 6 on each page after. This is what I want. The current readout looks like this: . The total count of my pages changes as soon as I ...
0
votes
1answer
565 views

Custom query vars filters problem with pagination

I have multiple custom query vars to filter products with the pre_get_posts hook and the add_query_arg function. All works fine except the pagination, when i navigate to the page number 5 (for ...
0
votes
2answers
56 views

Shortcode with pagination advancing multiple queries

I have some shortcode that I am using. The shortcode itself is working. The shortcode has pagination because it's cycling through a picture gallery. The pagination itself works, but when it advances, ...
1
vote
2answers
270 views

Shortcode pagination not advancing

I have a picture gallery that is working, I am converting it to a shortcode so the positioning can be flexible and I don't have to copy the code over and over again. The issue I am having is that the ...
0
votes
1answer
408 views

Getting rid of role=“navigation” in the Home Page Pagination

For the Pagination on the front page ort the Homepage I am using this one → <?php the_posts_pagination( array( 'mid_size' => 2 ) ); ?> Codex Reference #1 Codex Reference #2 In the actual ...
0
votes
1answer
42 views

Custom Pagination is Broken

Good Afternoon! I am working on adding pagination to a website and currently it is working fine but for some reason the function loads an extra page. We have 7 posts, and I set it to display 4 posts ...
0
votes
1answer
97 views

Pagination won't work on custom page

I have a custom page, where I show the posts from the articles section. I want to show 6 posts per page, and use a numbered pagination. Everytime I have to use 'pagination' outside archive.php or ...
1
vote
2answers
554 views

get_next_posts_link not working without parameter max_num_pages

I have a custom search page (searchpage.php) using pagination, and I am tring to add lines like below dynamically to my header.php inside <head></head> tag for better pagination SEO. <...
0
votes
1answer
1k views

Search not showing all results

EDIT: So I've done some troubleshooting and it seems my theme isn't showing woocommerce search results. The 2017 theme does so I am trying to figure out what my theme is missing. I suspect something ...
0
votes
1answer
529 views

Pagination not working on my archive page for a custom post type

First off I have a custom post type called events, and I wrote a custom query in in my archive-events.php file. Everything is working great except for the pagination. To trouble shoot I stripped ...
0
votes
1answer
873 views

Display page number on custom page title function

When paginating a blog archive, pages 2+ of a post archive are currently just displaying the single_post_title and not also the page number in the <title> tag. Is there a straightforward way to ...
4
votes
2answers
7k views

Modify previous and next text from pagination links

I set the pagination parameters in functions.php and echoed where I want the links to appear, so far so good. The problem is that the previous and next texts are not modifying. I put a random text to ...
0
votes
1answer
782 views

Problem with custom WP_Query and underlying pagination/posts_per_page

In my category template (category.php) I have the following code: <?php // Setup custom loop -- we need to exclude featured posts from listing so they aren't repeated $paged = get_query_var('paged'...
2
votes
3answers
550 views

When paginating a Page with the <!--nextpage--> tag, how can the 2nd and subsequent page styles be customised?

I want to apply different styles for a second page in single.php or posts. How can I do this? I have the following code in single.php to split the page in two parts: <!--nextpage--> If there ...
4
votes
1answer
3k views

Pagination adding page-numbers dots when using 'mid_size' => 0

Hey all, I'm attempting to do convert my current pagination: from : Prev 1 2 3 Next to: Page 1 of 2 --> My current code looks like this: if( ! function_exists( 'my_pagination' ) ) { ...
-1
votes
1answer
2k views

WooCommerce - Customer Order History Pagination

I'm trying to implement pagination into WC's customer order history that can be seen on the "My Account" page using woo_pagination(). https://docs.woothemes.com/document/woo_pagination/ The template ...
3
votes
1answer
149 views

Paged Single Post doesn't redirect to the main url after Removing Pagination

I used <!--nextpage--> (Codex) to paginate (split) a few single posts. Now i removed all the nextpage html parts from the posts. everthing looks fine. Unfortunately the old urls like sample....
0
votes
1answer
323 views

Pagination not displaying

I'm using HTML5Blank theme to edit my own theme on clean basis, and trying to set the pagination but it's not displaying for some reason, and I cant find out why. Index.php calls loop then pagination ...
0
votes
1answer
57 views

Pagination on Custom Post

I'm trying to figure out how I can display pagination on my wordpress template. Here is my work in progress. So far the page link doesn't show up <div class="eight columns"> <ul> ...
0
votes
1answer
699 views

WordPress not showing pagination links

In my WordPress Index.html I am pulling out the 3 latest posts by using <?php query_posts('posts_per_page=3') ?> <?php while(have_posts()) : the_post(); ?> //rest of the post related ...
1
vote
0answers
364 views

Pagination in relation to archive.php

A small problem here, I just don't know how to change this because I'm a self taught newbie. I made a child-theme from the simone-theme with a static front-page. To it I have the archive.php as the ...
0
votes
1answer
549 views

How to fix blank pagination links?

I am working on a Wordpress blog that has what appears to be custom pagination for the posts. As you can see here the correct amount of links are being rendered at the bottom of the page, however ...
0
votes
0answers
57 views

Pagination in Search result

How to do a pagination in search result? I have already an excerpt script. All I need is a script for pagination. Pls help me. Thanks function wpse_allowedtags() { return '<script>,<...
0
votes
2answers
624 views

Pagination fault in custom post type archive page [duplicate]

I create ad custom post type register_post_type( 'videos', $args); and custom taxonomy for that register_taxonomy( 'video_category_categorie', 'videos', $args ); Maximum number of post displayed is ...
0
votes
2answers
5k views

Pagination custom query

I am trying to make a custom page template that shows the most viewed posts. I can return posts but I am having trouble figuring out how to paginate it. Here is what I have: $args = array('orderby' =&...
0
votes
1answer
221 views

How to add PHP pagination to wordpress

I'm trying to make a custom PHP pagination work with wordpress, the page in wordpress is a very custom one, not a post or a page, it's a select from DB that shows flowers, the styling is ok now, but ...
0
votes
1answer
56 views

Adding pagination to custom Wordpress function

I am trying to add pagination to posts however i cannot figure out how to get it to work - it simply does not show the pagination as i need it to. It should display the first 15 posts on the first ...
0
votes
1answer
1k views

Prev/Next Links Broken on Static Front Page Pagination

I've taken the example straight from the codex on this one, and my pagination is broken. Here's the codex page I copied/pasted the code from: https://codex.wordpress.org/Function_Reference/...
0
votes
1answer
161 views

Unable to Change “Pages:” Before WP_LINK_PAGES

Below is a functions.php code for wp_link_pages which allows pagination and previous/next links to be displayed. It also wraps each pagination link in a span class called "classlinks". I need to ...
3
votes
1answer
2k views

Rewriting search and pagination base

After trying for weeks now how to find a working solution I got rid of most of my functions and trials and just left the pagination function underneath in my functions.phh file: /** * Pagination ...
0
votes
1answer
90 views

Modifying Page-Links <!--nextpage--> format

I'm developing a mobile theme and need to change the format of posts that are using the tag. Can I add something to functions.php to change the format? Ideally i'd like to make each page a list-...
6
votes
2answers
16k views

paginate_links() don't properly work in search.php?

I'm using this in my search.php template … <div class="pagination"> <?php echo get_pagination_links(); ?> </div> And this is the function … function get_pagination_links() { ...
2
votes
2answers
305 views

Find first image on paginated post for Pinterest

I've been looking for days, yet can't find a good answer. Perhaps the SE crowd can be of assistance. Any help is much appreciated. I am using a custom-coded pinterest button included on posts that ...
0
votes
1answer
162 views

Custom Query Not Paginating

I have a site that uses a custom query to filter posts: <?php //Search Region table to retrieve array of country names $regionresult = mysql_query("SELECT * FROM gallery_regions WHERE region='$...
0
votes
1answer
1k views

Replacing global wp_query

I have a site that uses a custom query to search for posts by country. The search results come back fine, but the pagination at the bottom reflects the total number of posts in the site, instead of ...
1
vote
3answers
3k views

Generating rel=prev and rel=next only on wordpress categories

I was trying to remove the rel=prev and rel=next tags from my website as my SEO gut suggested. I found those functions which perfectly do the magic: remove_action('wp_head', 'start_post_rel_link', 10,...
0
votes
3answers
4k views

Pagination Not Working (pages duplicating content)

My pagination pages echo out the same content on every page. Page one is queried to show two posts, which it shows up correctly. Page two shows the exact same two posts as page one does. Here is my ...
1
vote
2answers
7k views

Post Pagination Showing Same Posts Every Page

So I have this blog that filters by category Then by city. Somewhere while creating the filtration I broke the pagination which seemed to work fine earlier. It doesn't work on my homepage where it ...
4
votes
1answer
6k views

How to paginate the get_users function?

Im using the get_users function to show a custom list of users on the site. The only issue Im having a problem figuring out now is how to paginate the result. This is a sample of the function that Im ...
0
votes
1answer
1k views

Where to call my pagination function?

I have just been following this tutorial - http://www.lateralcode.com/wordpress-pagination/ I have written that function in my functions.php file and taken numerous notes on how it works. The ...
1
vote
6answers
12k views

How to style current page number (wp_link_pages)?

When a post is split on more pages TwentyTen theme use the native function wp_link_pages to display a navigation page bar at the end of post. I am trying to style those elements for my theme, but ...
0
votes
1answer
364 views

If paginated comments don't span to a second page, how do I hide the div wrapper?

I have a div wrapper around my comments pagination. I have the comments set to paginate in the Wordpress admin at 10 comments per page. I want to hide the div wrapper if there are less than 10 ...