-
AuthorPosts
-
May 16, 2014 at 11:22 am #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
May 16, 2014 at 6:16 pm #265901Hi tredition!
Please refer to Josue’s post here – https://kriesi.at/support/topic/pagination-needs-to-anchor-back-to-part-of-the-page-where-blogs-are-featured/#post-262618
Regards,
YigitMay 16, 2014 at 6:26 pm #265903This reply has been marked as private.May 16, 2014 at 6:47 pm #265908Hi!
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!
YigitMay 16, 2014 at 8:36 pm #265951That does not work. Do you have another idea?
Regards
Sandra
May 16, 2014 at 8:39 pm #265954Hey!
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!
YigitMay 16, 2014 at 9:05 pm #265969I’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
May 18, 2014 at 11:26 pm #266498Hi Sandra,
Where in your website is the blog/masonry element in question? can you post a link to that page please?
Regards,
JosueMay 18, 2014 at 11:29 pm #266501This reply has been marked as private.May 18, 2014 at 11:42 pm #266506Hi,
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,
JosueMay 18, 2014 at 11:56 pm #266516Hi 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
May 19, 2014 at 12:02 am #266522Hi Sandra!
I didn’t understand your question, could you please elaborate?
Regards,
JosueMay 19, 2014 at 12:06 am #266524At 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.
May 19, 2014 at 12:11 am #266528Oh 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,
JosueMay 19, 2014 at 12:15 am #266531I’m sorry, but now both problems hapen at once!
May 19, 2014 at 12:23 am #266532Here’s how it works right now:
Best regards,
JosueMay 19, 2014 at 12:39 am #266542I don’t understand. I inserted the last code snippet you sent. Now, if I click on 1, 2, 3, the right part changes, too.
May 19, 2014 at 12:44 am #266545That’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,
JosueMay 19, 2014 at 12:51 am #266550Ok, thanks a lot for your help and patience.
May 19, 2014 at 12:53 am #266551You are welcome, glad we could help :)
Regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.