Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Product masonry pagination issue #1254115

    Hi Mike,
    thanks for your help.
    I am sharing my solution because yours wasn’t complete:

    
    function custom_pagination_slider_script(){
    ?>
    <script>
    (function($){
    	$(document).ready(function() {
    		var thispag = $( ".pagination-wrap.pagination-slider nav.pagination a" );
    		var thisfirst = $( ".pagination-wrap.pagination-slider nav.pagination a" ).eq(0);
    		var thisone = $( ".pagination-wrap.pagination-slider nav.pagination a" ).eq(1);
    		var count = thispag.length;
    		var baseurl = location.protocol + '//' + location.host + location.pathname;
    		var url = document.URL;
    		var theURL = url.split( "=" )[0];
    		var theindex = url.split( "=" )[1];
    
    		if ( count > 0 ) {
    			if ( theindex == 1 ) {
    				thispag.attr( "href", baseurl );
    			} else if ( theindex > 1 && count < 5 ) {
    				thisfirst.attr( "href", baseurl );
    			} else if ( theindex == 2 && count > 4 ) {
    				thisfirst.attr( "href", baseurl );
    				thisone.attr( "href", baseurl );
    			} else if ( theindex == 3 && count > 4 ) {
    				thisfirst.attr( "href", theURL + "=" + ( theindex - 1 ) );
    				thisone.attr( "href", baseurl );
    			} else if ( theindex > 3 && count > 4 ) {
    				thisfirst.attr( "href", baseurl );
    				thisone.attr( "href", theURL + "=" + ( theindex - 1 ) );
    			}
    		}
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'custom_pagination_slider_script');
    

    I hope it could help someone.
    Regards,
    Dario

    in reply to: Product masonry pagination issue #1252500

    Hi,
    I’m having the same problem but with a different element (blog posts). I have inserted the “blog posts” block to show the news on my page which, through the theme settings, I have set as a blog page. Everything works correctly, except that if I try to click on the first element of the page or on the arrow to go back I cannot go back to the first page. I noticed the following:
    – the arrow to go back allows you to go to the previous page, but not to the first page;
    – the first element, page 1, takes the value “?avia-element-paging=2” if we are on page 2, “?avia-element-paging=3” if we are on page 3 and so on. In conclusion it is not possible to return to the blog home page.
    Could you let me know how to solve the problem?
    Thanks for your help!

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