By using Elementorforum.com’s services you agree to our Cookies Use and Data Transfer outside the EU.
We and our partners operate globally and use cookies, including for analytics, personalisation, ads and Newsletters.

  • Join the Best Unofficial Elementor Support forum

    Provide or get advice on everything Elementor and Wordpress, ask questions, gain confirmation or just become apart of a friendly, like minded community who love Wordpress and Elementor


    Join us!
elementor official

Question changing global widget settings from backend

L

lightx

New Member
hey everyone,
i am creating a ajax pagination plugin for the woocommerce products widget,
so when the user clicks the next page button, a request is sent to the backend and then queries the database for product posts:

PHP:
$loop = new WP_Query( $products_args );
if ( $loop->have_posts() ){echo "<ul class='products'>";
   while ( $loop->have_posts() ) : $loop->the_post();
        wc_get_template_part( 'content', 'product' );
    endwhile;
    echo "</ul>";
}
then as you can see, prints the template part content product.
but instead i would like to get a global widget i created with the right css and settings, with the queried posts.
i thought to output the shortcode of the global widget, but i don't know how to change the query or posts inside.

thanks for the help.
(in the attached link you can see at the suggested products above the price a pagination on the left side, test it and see what is happening to the products. i need them to be as they where at the first place)

product page link for example: sfwp .lightx. co. il/shop/item
 
elementor official
Last edited:
elementor official
Top