Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #882935

    I have a custom post type which includes a custom loop output using a short code in my enfold child functions.php. All works great and my page url looks like this:

    domain.com/region/east/

    One thing I’ve noticed though is if my custom loop outputs pagination, the path on the paginated links is incorrect and uses this:

    domain.com/region/east/2/ <- missing ‘page’ from the url

    Instead of:

    domain.com/region/east/page/2/ <- what it should be

    I’m using avia_pagination in my custom function to output the pagination. If I enter the URL manually and include ‘page’ the pagination works as expected but because it’s not included in the generated links the pagination is broken.

    I could fix this with jQuery but I was hoping there might be a php alternative.

    Thanks!

    #882978

    Should have thought of this before asking the question:

    		$page_string = avia_pagination($page_number_max, 'nav');
    		if ( !strpos($page_string, '/page/') ) {
    			$page_string = preg_replace("/\/\d\//", "/page$0", $page_string);
    		}
    #883713

    Hi,

    Thanks for sharing that, I’m guessing it solved your problem?

    Best regards,
    Rikard

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.