PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Pagination isn't working with MDTF

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi there,

This was working correctly for a long time and I'm not sure why it isn't any more. My filtering is working fine and I can see there are multiple pages of results once I filter by something. However, if I click to page 2 (or 3 or 4 or 5) of results, it just resets to page 1 of results. Please see here with filters in the right hand sidebar:

https://neuroscience.berkeley.edu/news/

I appreciate any help you can offer.

Hello

Please read  this - https://wp-filter.com/howto/pagination-doesn-work-what-to-do/

what plugin version number are you using?

Hi Pablo! Could you tell me what you mean by"on the same bottom uncomment code"? I'll try editing this .php file and testing it out but am al little unclear on whether I am adding or deleting wp_reset_query(); and where.

"In the file wp-content\plugins\meta-data-filter\views\shortcode\meta_data_filter.php on the same bottom uncomment code wp_reset_query(); and try is the filter still works and pagination is ok."

The version I'm using is 1.3.01

Thank you!
Cari

Hello Cari

Please  try  it - https://share.pluginus.net/image/i20220826074736.png

But use  this  code:

<?php if (class_exists('MetaDataFilter') AND MetaDataFilter::is_page_mdf_data()): ?>
<script >
jQuery(function () {
//pagination fix
var pag_links = jQuery('#pagination').find('a.page-numbers');
jQuery.each(pag_links, function (index, a) {

jQuery(a).attr('href', jQuery(a).attr('href').replace('#038;', '&'));
var l = jQuery(a).attr('href');
var res = l.split("/page/");
var p = 1;
if (res[1] !== undefined) {
p = parseInt(res[1]);
}

jQuery(a).attr('href', l + '&mdf_page_num=' + p);
});
});
</script>
<?php endif; ?>

Thank you, Pablo. The site is on Pantheon and I only have read access to the footer.php file, so I need to ask the IT team to do this for me. To be 100% clear, can you help me confirm exactly what I want him to do. I do not have any code that exactly matches <?php wp_footer(); ?>—the closest I can find is <div id="footer-outer" <?php nectar_footer_attributes(); ?>>

So is the code below correct?

----------------------------------------

<?php
/**
* The template for displaying the footer.
*
* @package Salient WordPress Theme
* @version 12.2
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$nectar_options = get_nectar_theme_options();
$header_format  = ( !empty($nectar_options['header_format']) ) ? $nectar_options['header_format'] : 'default';
nectar_hook_before_footer_open();
?>
<div id="footer-outer" <?php nectar_footer_attributes(); ?>>

<?php if (class_exists('MetaDataFilter') AND MetaDataFilter::is_page_mdf_data()): ?>
<script >
jQuery(function () {
//pagination fix
var pag_links = jQuery('#pagination').find('a.page-numbers');
jQuery.each(pag_links, function (index, a) {

jQuery(a).attr('href', jQuery(a).attr('href').replace('#038;', '&'));
var l = jQuery(a).attr('href');
var res = l.split("/page/");
var p = 1;
if (res[1] !== undefined) {
p = parseInt(res[1]);
}

jQuery(a).attr('href', l + '&mdf_page_num=' + p);
});
});
</script>
<?php endif; ?>

<?php
nectar_hook_after_footer_open();
get_template_part( 'includes/partials/footer/call-to-action' );
get_template_part( 'includes/partials/footer/main-widgets' );
get_template_part( 'includes/partials/footer/copyright-bar' );
?>
</div><!--/footer-outer-->
<?php
nectar_hook_before_outer_wrap_close();
get_template_part( 'includes/partials/footer/off-canvas-navigation' );
?>
</div> <!--/ajax-content-wrap-->
<?php
// Boxed theme option closing div.
if ( ! empty( $nectar_options['boxed_layout'] ) &&
'1' === $nectar_options['boxed_layout'] &&
'left-header' !== $header_format ) {
echo '</div><!--/boxed closing div-->';
}
get_template_part( 'includes/partials/footer/back-to-top' );
nectar_hook_after_wp_footer();
nectar_hook_before_body_close();
wp_footer();
?>
</body>
</html>

Hello

 I do not have any code that exactly matches <?php wp_footer(); ?>  - Here - https://share.pluginus.net/image/i20220829071817.png

So  please add  the code  here - https://share.pluginus.net/image/i20220829071952.png

I was finally able to get the IT person to load ht new footer file with the fix above to our dev site and the search no longer works at all, I ge a 404 page when trying to search:
https://dev-helen-wills-neuroscience-institute.pantheon.berkeley.edu

Thanks in advance for your help!

Hello

My test - https://c2n.me/4h3zE70   - It looks like it works

, I ge a 404 page - it can be if you configured the filter incorrectly - https://share.pluginus.net/image/i20221107090127.png