Skip to:
Content
Pages
Categories
Search
Top
Bottom

pagination not working

  • Avatar of fskv
    fskv
    Participant

    @fskv

    Hi,

    I am creating a new plugin but on template page it shows 1 2 ...7 -> page links correctly but when I click on any page number it doesn’t load the page. It just shows a loading image and nothing happen.

    Can someone help what’s wrong?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    You either need to write the AJAX function to handle this (you should be able to copy something from one of the core components) or put a class=”no-ajax” on the surrounding div.

    Avatar of fskv
    fskv
    Participant

    @fskv

    @andy

    Thanks for the quick reply.

    May I have some reference to file where should I look?

    Avatar of fskv
    fskv
    Participant

    @fskv

    hi, anyone thr?

    Avatar of Peter Anselmo
    Peter Anselmo
    Participant

    @peteranselmo

    fskv,

    I ran into the same thing. It usually happens if you use the class “pagination” for a div. Buddypress searches the page for divs with that class and “Hijacks” the click to use ajax. Here is the specific line in global.js:

    if ( target.parent().parent().hasClass('pagination') && !target.parent().parent().hasClass('no-ajax') ) {

    Look at where you created the divs for your pagination, and as Andy said: add “no-ajax” to the class.

    Avatar of nickrita
    nickrita
    Participant

    @nickrita

    To have the pagination on the homepage-activity-stream I just added the no-ajax class to the code and it works.

    Wrote ticket 2223 to have the no-ajax class in the pagination code in activity-loop.php, so that it works without having to find this thread.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.