Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #608596

    I have searched the forum and have seen this topic quite a bit – however, i am not sure if has been implemented in the latest theme or not..
    Basically, i have a portfolio gallery at the bottom of the page, 15 images up, pagination on, and multiple pages of content –
    Is there a way that the images can load when user clicks on the next page – without loading entire page?
    In my case, when users click next page, it loads new page, and then user has to scroll to the very bottom of page.

    thanks!

    #608610

    Hi!

    There’s no easy way to do that with the element you’re using but you could switch to the Masonry element, it has an option that let’s you place a “Load More” button that loads new entries via Ajax (without reload).

    Regards,
    Josue

    #608624

    Bummer!
    Is there anyway i could “hardcode” an anchor url to the pagination buttons?
    for instance, Page 2 button would have a link like page/2#gallery instead of just page/2
    That way, when the page reloads, i can have it show the same area of the page.
    Just a thought…

    #608694

    Hi,

    Try adding this at the very end of your theme / child theme functions.php file:

    function add_custom_script(){
    ?>
    <script>
    (function($){
        $(window).load(function() {
            $(".pagination a").each(function(){
               var theLink = $(this).attr("href");
               $(this).attr("href", theLink+"#gallery");
            });
        });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Regards,
    Josue

    #609037

    Perfect! works great!
    thanks so much!

    #610182

    You are welcome, glad to help :)

    Regards,
    Josue

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.