Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1221190

    Hi there,

    I have a portfolio grid (which I will use multiple times) and want it in one row with pagination, but when I click on page 2 it goes to the top of the page)

    I have looked into the issue in support/forum and tried:
    https://kriesi.at/support/topic/link-to-next-page-when-using-portfolio-grid-in-enfold-one-page-website/
    in combination with:
    https://kriesi.at/support/topic/portfolio-pagination-link-to-id-works-wrong/

    But all it does is not make pagination work at all.

    #1223028

    Hey Frank,

    Sorry for the delay. Did you replace the ID in the snippet with the ID of the color section containing the blog posts or pagination?

    var news = $('#transaksjoner'),
    

    If the posts element is not inside a color section yet, try to move it inside one, then apply a unique section ID to the color section. You’ll find the Custom ID Attribute field in the Advanced tab of the color section. After defining the ID (e.g “custom-section”), go back to the script or snippet, look for the same line mentioned above and replace the selector with the custom ID.

    var news = $('#custom-section'),
    

    Best regards,
    Ismael

    #1236636

    Hello,

    I’ve tried to get this to work on my site too. But no luck, I don’t know what I’m doing wrong.
    There a color section with and ID, there’s the script in my functions.php file. (I’m using a child theme)
    But there’s still a page reload that stays at the top of the page instead of going to the anchor.

    #1237221

    Hi,

    @Tom: Where did you add the element with the pagination? We found one in the home page but it’s using the AJAX pagination instead of the default one. Site looks good by the way.

    Best regards,
    Ismael

    #1237316

    Hi Ismael,

    That’s odd. The element I’m talking about is still there.
    The pagination is the 1 – 2 – 3 at the bottom of it, and it opens a new page, not AJAX. Once you click on the image it opens the AJAX portfolio, but also there the arrows don’t seem to work. I’m 100% sure I’m using a portfolio grid element, in the special one column mode with pagination and AJAX portfolio preview.

    #1238345

    Hi,

    @Tom: Sorry I missed the pagination in the #recentecases container. Try to add this script in the functions.php file.

    function add_custom_script(){
    ?>
    <script type="text/javascript">
    (function($){
    function b(id) {
    		$('.pagination .inactive').click(function(e) {
    			e.preventDefault();
    
    			var section = $(id),
    				link = $(this).attr('href'),
    				anchor = $(section ).attr('id');
    
    				if(!section.length) return;
    
    				var link = link + '#' + anchor;
    				window.location.href = link;
    		});
    	}
            
            $(document).ready( function() {
                b('#recentecases');
            });
    })(jQuery);
    </script>
    <?php 
    }
    add_action('wp_footer', 'add_custom_script');

    Best regards,
    Ismael

    #1238427

    No worries Ismael,

    Thanks for the code, but it doesn’t seem to be working at all. Deleted browser cache, changed to another browser…

    #1238994

    Hi,

    Thank you for the update.

    The code is there but for some reason it’s not taking effect. We might have to wait for the document to be ready before executing the function. We adjusted the code a bit. Please try it again.

    We just changed this line:

    $(document).ready( function() {
        b('#recentecases');
    });
    

    Best regards,
    Ismael

    #1323682

    Have the same problem and I did NOT resolve with your code.

    Maybe I miss something.
    I have one page website with a anchor link to the #referenze (in my website) and inside this block I have the portfolio grid when I click on the second page go to the ?avia-element-paging=2 and unfortunately to the top of the page.

    I try the different code that I found in the forum but for sure I miss something, can you maybe post exactly how to fix.

    Can you help please?

    #1323744

    Hi,


    @wj5
    : Did you apply a unique ID to the section containing the posts element? In the previous example, the name of the section containing the element with the pagination is “recentecases”, so we used function b and place “#recentecases” as the value of the id parameter.

    b('#recentecases');
    

    Best regards,
    Ismael

    #1323769

    Yes I include the personal ID name that for me is : b(‘#referenze’);

    #1323840

    Hi,


    @wj5
    : Please open a new thread, provide the login details in the private field and post the link here. We will check the site and test the script. Make sure that the Appearance > Editor panel is accessible.

    Best regards,
    Ismael

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.