NO BUG: Pagination Issue

Has anyone else faced this issue before?

I recently relaunched a website for a client, moved from oxygen builder to bricks builder and migrated from gridpane/vultr hf to cloudways/vultr hf and changed some seo settings using seopress pro.

https://www.belizerealestateagent.com/properties-for-sale/

What I have noticed is that pagination is working (ie I can click on page 2, 3 etc) however when on the other pages the pagination element stays on page 1.

Note I am not using the default cpt archive for this. I built the properties page using custom query loop in bricks builder with a pagination element.

See it live here: https://www.belizerealestateagent.com/properties-for-sale/

Any ideas? Thanks so much!

The pagination element looks correct to me.

But when a page link is clicked it seems like FacetWP is interfering with the pagination.

It works correctly when you open the “subpages” directly:

When clicking on subpages directly, say Page 2, it looks “clean” and pagination is set correctly. However, trying to press “next” or choose say Page 3, the problem persists - the next button doesn’t work and choosing page 3 for example, adds a paged URL to that page example /page/2/?_paged=3

That’s what I‘m saying. I guess FacetWP interferes the request. Can you try it with FacetWP disabled?

1 Like

I haven’t used facetWP with Bricks, but generally speaking
 with these facet plugins you need to use their own pagination facets instead of WP pagination. The same is true for WPGridBuilder.

FacetWP have their ‘pager’ facet for adding pagination to work with their filters
 Pager | FacetWP

(but whether or not facetWP is supposed to integrate with Bricks’ pagination, I’m not sure)

2 Likes

I had a similar problem with a query loop on a page showing “team members” and managed to solve it by adding some code to my theme to prevent WP canonical redirects (see links):

https://core.trac.wordpress.org/ticket/15551

I modified the code a bit for my own setup and added a check to see if post type is set because it caused some errors on other pages/queries but now the pagination works and the new pages load as expected.

Hope it helps

±--------
function pf_wp_adjust_show_request( $request ) {
if(isset($request->query_vars[‘post_type’])){
if ($request->query_vars[‘post_type’] === ‘team_members’ && $request->is_singular === true && $request->current_post == -1 && $request->is_paged === true ) {
add_filter( ‘redirect_canonical’, ‘__return_false’ );
}
}
return $request;
}
add_action( ‘parse_query’, ‘pf_wp_adjust_show_request’ );

1 Like

yeah its def FacetWP @aslotta @wplit , it works fine if facetwp is disabled:

I was avoiding using facetwp pagers as its AJAX based, and that can have its own SEO errors/issues. No?

Seems FacetWP’s page works for this purpose indeed. Working correctly with it: Beautiful Properties For Sale In Belize - RE/MAX Belize Real Estate Agent

As mentioned previously I am just concerned that this is AJAX based and may interfere with SEO?

" If you are using a Pager facet for pagination on archive pages, be aware that the individual posts on the subsequent paged pages, and the paged pages themselves, will not be seen and indexed by search engines. The Pager facet’s <a> tags do not have href attributes with links that the search engine spider can follow. Also, users without JavaScript enabled will not be able to see and use any pagination on paged archives that you are using FacetWP on.

For SEO, this is not necessarily problematic, as long as all individual posts are reachable for the search engine spider through other archive pages on the site, like post-type archives and term archives. Another way to make sure all pages are found is by implementing a sitemap and pointing to it in your robots.txt file.

If you are concerned about the implications for SEO or accessibility of using the Pager facet’s AJAX-based pagination, read this section that lists a few possible approaches."

https://facetwp.com/help-center/developers/the-facetwp-url/#facetwp-pagination-seo-and-accessibility

Another common solution is to add a prev/next (adjacent posts) links to each post page. Then you know every single post is always going to be linked from another post and can be found by bots.

But yes, this is a problem that the facet plugins bring with them. They’re not designed to work with WP pagination, that’s why they all have their own solutions for pagination / load more etc.

1 Like

One last question, please

From your experience, would you keep the CPT archive public for SEO purposes and then just have these pages with custom loops for search or filtering?

Since the faceted pagination doesn’t work for SEO/google crawl bots etc.

what’s your take or advice on this? thanks so much, David