Blog Posts – Scroll to view more

Load all the posts and hide them exclude 10. If the user scroll to page bottom show more 10. $(‘article’).each((i, el) => { if (i > 9){ $(el).hide(); } }); $(window).scroll(() => { if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) { $(‘article:hidden’).first().show(); } });

get_query_var(‘paged’) for WP_Comment_Query always return 1 when using paginate_comments_links()

I’m sure the problem is in this line of code, since it ALWAYS return 1: $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; Yes, that’s correct. And to retrieve the page number of the current comments page, where the URL contains the /comment-page-<number>, use get_query_var( ‘cpage’ ) and not get_query_var( ‘paged’ ), i.e. the query var … Read more

File not found.