Testimonials fail on multi-paged views
-
There is an issue where if a shortcode is on a page that has multiple pages (ie /page/2/) then the shortcode tries to pull page 2 of testimonials which will often error out and show the “no testimonials found” message.
As a workaround, I included these shortcodes before and after the BNE shortcode to pretend for that moment that we are still on page 1. It works.
[fix_bne_paged_before][bne_testimonials ... ][fix_bne_paged_after]
add_shortcode('fix_bne_paged_before', function(){ $_REQUEST['bne_pg'] = get_query_var('paged'); set_query_var('paged', 1); }); add_shortcode('fix_bne_paged_after', function(){ set_query_var('paged', $_REQUEST['bne_pg']); unset($_REQUEST['bne_pg']); });
It would be great to have this fixed or even if there’s a hook that I can tie in to before and after so I don’t have to add shortcodes every time.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Testimonials fail on multi-paged views’ is closed to new replies.