Hey,
For some unknown reason, sermon pagination stopped working a few months ago.
To fix the issue on my website, I've removed
from paginate_links() here :
|
$add_args = array(); |
|
|
|
foreach ( |
|
array( |
|
's', |
|
'p', |
|
'post_type', |
|
'page_id', |
|
) as $query_var_name |
|
) { |
|
$query_var = get_query_var( $query_var_name ); |
|
if ( $query_var ) { |
|
$add_args[ $query_var_name ] = $query_var; |
|
} |
|
} |
|
|
|
echo paginate_links( array( |
|
'base' => preg_replace( '/\/\?.*/', '', rtrim( get_permalink( $post_ID ), '/' ) ) . '/%_%', |
|
'current' => $query->get( 'paged' ), |
|
'total' => $query->max_num_pages, |
|
'end_size' => 3, |
|
'add_args' => $add_args, |
|
) ); |
I guess it comes from a WP (and/or my theme) updates, because post_type query variable is added to pagination links, while it are is present in query URL.
For example, I get links of the form /predications/?post_type[0]=post&post_type[1]=page&post_type[2]=e-landing-page
I checked the reason of this add_args in Git history, so I guess it's important to keep it, but for now it leads to a bug. Should you consider removing it for a future release?
Regards.
Hey,
For some unknown reason, sermon pagination stopped working a few months ago.
To fix the issue on my website, I've removed
from
paginate_links()here :Sermon-Manager/includes/class-sm-shortcodes.php
Lines 1138 to 1160 in d8ce547
I guess it comes from a WP (and/or my theme) updates, because
post_typequery variable is added to pagination links, while it are is present in query URL.For example, I get links of the form
/predications/?post_type[0]=post&post_type[1]=page&post_type[2]=e-landing-pageI checked the reason of this
add_argsin Git history, so I guess it's important to keep it, but for now it leads to a bug. Should you consider removing it for a future release?Regards.