Created
November 30, 2016 08:05
-
-
Save FSahinn/b426a12569487aea22b29d5c56fc6539 to your computer and use it in GitHub Desktop.
Wordpress için infinite scroll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// index.php'ye eklenecek kod | |
<div id="infinite-scroll-wrap"> | |
<?php next_posts_link('Sonraki sayfa'); ?> | |
</div> | |
// JS'ye eklenecek fonksiyon | |
jQuery(document).ready(function() { | |
jQuery('#icerik .sagalan').infinitescroll({ // yazıların bulunduğu class ya da id | |
navSelector : "#infinite-scroll-wrap", // Seçicinin bulunduğu id | |
nextSelector : "#infinite-scroll-wrap a:first", // Seçicinin bulunduğu ilk sayfa id | |
itemSelector : "#icerik .sagalan .yazi", // Yazı class ya da id | |
debug : false, | |
loading: { | |
img : "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", | |
msgText : 'Sözler getiriliyor...', // Yazılar getirilirken çıkan yazı | |
finishedMsg : 'Daha fazla söz bulamadık!' // Yazılar bittiğinde çıkan yazı | |
}, | |
animate : false, | |
dataType : 'html' | |
}); | |
jQuery('ul.sayfalama').remove(); // Sayfalamayı kaldırmak için class ya da id'yi buraya girin | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment