What is the best way to add ajax load more functionality for custom data that is fetched with $wpdb. The data has been created by wordpress plugin.

    $querystr = "SELECT * FROM `wp_plugin_items` ORDER BY `wp_plugin_items`.`item_type` ASC ";
        $pageposts = $wpdb->get_results($querystr, OBJECT);
        foreach ($pageposts as $p) {
            $text=$p->post_text;
            $url=$p->post_permalink;?>
           <div class="item"><?php echo $text;?><a href="<?php echo $url";?>link</a></div>
<?php }?>

Read more here: WordPress – How to add ajax "more" loader function for custom plugin data queried with $wpdb


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: