Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #265766

    Hi,

    I inserted a Blog and a Masonry Galarie in the middle of a page and acivated “Paginierung”. But if you click at the numbers you go to the top of the page and have to scoll down to see the next page.

    What can I do that you stay at the same point of the page if you klick throught the “Paginierung”?

    Regards

    Sandra

    #265901
    #265903
    This reply has been marked as private.
    #265908

    Hi!

    Please edit the color section that contains Buch Des Monats and give it a unique ID “postings” ( http://kriesi.at/documentation/enfold/wp-content/uploads/sites/2/2013/12/color-section-ID.png )

    Cheers!
    Yigit

    #265951

    That does not work. Do you have another idea?

    Regards

    Sandra

    #265954

    Hey!

    It seems like you gave ID “portfolio”. Please find

    jQuery(this).attr(“href”, theLink+”#postings”);

    in the code Josue posted and change #postings to #portfolio. Color section ID and section in the code should match

    Cheers!
    Yigit

    #265969

    I’m sorry, but it still does not work.

    – I made sure, that both IDs are the same (postings)
    – I inserted the code at the end in the file avia.js (that was another mistake, first I inserted it in the Quick CSS)

    But the problem is not solved.

    What am I doing wrong?

    Sandra

    #266498

    Hi Sandra,

    Where in your website is the blog/masonry element in question? can you post a link to that page please?

    Regards,
    Josue

    #266501
    This reply has been marked as private.
    #266506

    Hi,

    This will do it (in js/avia.js):

    jQuery(window).load(function(){
    jQuery('#postings a').each(function(){
    var theLink = jQuery(this).attr('href');
    jQuery(this).attr('href', theLink+'#postings');
    });
    });
    

    Alternatively if you use a child theme you can put it in functions.php this way:

    function add_custom_js(){
    	?>
    	<script type="text/javascript" charset="utf-8">
    	  jQuery(window).load(function(){
    	   jQuery('#postings a').each(function(){
    	   var theLink = jQuery(this).attr('href');
    	   jQuery(this).attr('href', theLink+'#postings');
    	   });
    	   });
    	</script>
    	<?php
    }
    add_action('wp_footer', 'add_custom_js');

    Regards,
    Josue

    #266516

    Hi Josue,

    the first option works! Is it right that both post in this sector at the homepage slide if I insert the “Paginierung” just at the left blog posts?

    Regards

    Sandra

    #266522

    Hi Sandra!

    I didn’t understand your question, could you please elaborate?

    Regards,
    Josue

    #266524

    At the “Startseite” we have the sector “Aktuelles”. There I have inserted two blogs “BUCH DES MONATS” and “Neues von tre…”. But I just activated the “Paginierung” at the left blog “BUCH DES MONATS”. If I click through the pages, the right blog “Neues von tre…” changes, too.

    #266528

    Oh i see, my fault. Change the code to:

    jQuery(window).load(function(){
    jQuery('#postings .pagination a').each(function(){
    var theLink = jQuery(this).attr('href');
    jQuery(this).attr('href', theLink+'#postings');
    });
    });

    Best regards,
    Josue

    #266531

    I’m sorry, but now both problems hapen at once!

    #266532

    Here’s how it works right now:

    Best regards,
    Josue

    #266542

    I don’t understand. I inserted the last code snippet you sent. Now, if I click on 1, 2, 3, the right part changes, too.

    #266545

    That’s expected, both elements are essentially dynamic post queries and if WordPress detects a pagination request it will affect both, if you want the right part to remain static you’d need to build it that way (static text block element, titles, etc).

    Regards,
    Josue

    #266550

    Ok, thanks a lot for your help and patience.

    #266551

    You are welcome, glad we could help :)

    Regards,
    
Josue

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