Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8900721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:10:01+00:00 2026-06-15T01:10:01+00:00

Ok I have been doing some research here and I am not sure on

  • 0

Ok I have been doing some research here and I am not sure on how to solve this problem as most of the ajax and wordpress topics seem different to mine.
Pretty much I have a site

http://dev.touch-akl.com/childsplay/

and in the blogs section it shows the three latest blogs with a more stuff link that I want to load in the next 3 posts with ajax.

My jQuery is as follows

loadPosts();

function loadPosts(){

        var $loadBtn = $('.ajax-load a');
        var $loadCont = $('#ajax-content');
        var pageTitle = document.title;


        $loadBtn.live("click",function(e){
            e.preventDefault();

            var sourceTarget = '#ajax-content .the-posts';
            $this = $(this);
            pageUrl=$this.attr('href');

            $loadCont.fadeTo(500,0);

            $loadCont.load(pageUrl+" "+sourceTarget, function(){

                $loadCont.fadeTo(500,1);

                        if(window.history.replaceState){
                     document.title = pageTitle;
                     window.history.replaceState(null, pageTitle, pageUrl);
                   }                                

                        //loadJQUERY(sourceTarget);
            }); // end ajax load    

        });     // end click function

}   

and the html

        <div id="ajax-content">
            <div class="the-posts">

                <?php
                // START A QUERY OF THE NEWS ITEM POSTS AND LOOP THAT THANGGGG
                if ( get_query_var('paged') ) $paged = get_query_var('paged');  
                if ( get_query_var('page') ) $paged = get_query_var('page');

                query_posts('posts_per_page=3&paged=' . $paged);

                if (have_posts()) : while (have_posts()) : the_post(); ?>   

                    <article class="three columns">
                        <h3>The Most Recent Post</h3>
                        <img class="blog-image" src="<?php bloginfo('template_url');?>/images/blog/blogs-post.jpg" alt="Childsplay">
                        <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text.</p>
                        <a href="#">Read More</a>
                    </article>

            <?php endwhile; ?>

                    <div class="navigation">
                        <span class="left ajax-load"><? previous_posts_link('&larr; More Stuff') ?></span>
                        <span class="right ajax-load"><? next_posts_link('More Stuff &rarr;') ?></span>
                    </div>      

            <?php else : endif; ?> 
            <?php wp_reset_query(); // reset the query ?>   

        </div>
    </div>

It seems like it cannot find the page even though the permalink is set to the default of what the wordpress next posts button is.

Is my way of ajax not very good for wordpress? I have seen people use other ways but I dont quite understand them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:10:03+00:00Added an answer on June 15, 2026 at 1:10 am

    If you want to consider using plugin then theres a ton. Heres what Ive found so far. Maybe this would help you
    This one is a step by step process http://www.mygeekpal.com/creating-an-ajax-powered-pagination-in-wordpress/

    This one is nice too but the concept is different http://wordpress.org/extend/plugins/ajax-pagination/screenshots/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a homework problem that I have. I have been doing some research
I have been doing some research on this but found no clear answer. The
I have been doing some research on test driven development and find it pretty
I have been doing some research for using MSMQ. Following 2 gave me fundamental
So I have been doing some research into getting my UTF8 to print correctly.
I love my GUID. However, lately I have been doing some research to understand
I've been doing some research into finally automating our Development builds and still have
I have been doing some research on the correct procedure to follow when working
I have been doing some research on what the easiest way to get phone
I have been doing some research about how to do custom profileprovider in .NET

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.