Hello,
I’m using PageBuilder and i want to load the pages using Ajax. It’s working but i had a problem using the Post Loop widget, because i get a blank page.
I searched a bit and i found this :
https://github.com/wp-plugins/siteorigin-panels/blob/master/widgets/basic.php#L170
function widget( $args, $instance ) { ... if( is_admin() ) return; ...
All the Ajax calls must be routed in : /wp-admin/admin-ajax.php. But the
is_admin()function will always return
truedue to this routing.
I would like to know :
1 – Is there a simpler solution than duplicate the widget and remove this line
2 – Why is this condition checked ?
Hello, i’m always facing this problem, can someone can help me ? Thanks :)
Hi Andy
Sorry we missed your thread last time.
The main reason we’re adding in that check in is to prevent the possibility of infinite loops coming up, which was happening in the admin. I’ll look at making that check filterable for use cases like yours. Basically something along the lines of:
Hello Andy,
I was wondering if you have documented in some place about how to use ajax with Siteorigin. I’m needing to make an ajax pagination of a widget, so if you can share what you have, it should be good in order to get an idea.
Thanks!!