How to automatically load more data when users reaches at the bottom of the page of the wordpress site?

You can run an ajax request when user hits the bottom of the page if($(window).scrollTop() == $(document).height() – $(window).height()){ //your ajax request } the link to ajax rquest https://codex.wordpress.org/AJAX_in_Plugins for how to add data https://rudrastyh.com/wordpress/load-more-posts-ajax.html instead of loadmore button you can paste your ajax request in the if condition

Duplicating pagination on second page

I found this article and got it to work <div class=”posts”> <?php $paged = ( get_query_var( ‘paged’ ) ) ? get_query_var( ‘paged’ ) : 1; $the_query = new WP_Query( ‘cat=16&paged=’ . $paged ); ?> <?php if ( $the_query->have_posts() ) : ?> <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <?php get_template_part( ‘partials/loop’, ‘archive’ ); ?> … Read more

Modifying previous_posts link to use AJAX

What am I doing wrong here? First, and foremost… I am editing the wp-includes/link-template.php file in WordPress Don’t hack Core files! Especially when there is a filter that should do what you need. add_filter( ‘previous_posts_link_attributes’, function ($clauses) { echo ‘previous_posts_link_attributes’; return ‘test=”attribute”‘; }, 1 ); You could insert your onclick with the filter. However, your … Read more

Custom Post Type Pagination For Genesis Child Theme [closed]

EDIT Try this code: remove_action( ‘genesis_loop’, ‘genesis_do_loop’ ); add_action( ‘genesis_loop’, ‘sk_do_loop’ ); function sk_do_loop(){ global $wp_query; $temp_query = $wp_query; // Fix for the WordPress 3.0 “paged” bug. $paged = 1; if ( get_query_var( ‘paged’ ) ) { $paged = get_query_var( ‘paged’ ); } if ( get_query_var( ‘page’ ) ) { $paged = get_query_var( ‘page’ ); … Read more

How to split long posts in multiple pages in twentysixteen

You have to add <!–nextpage–> in Text mode of editor. If you add it through Visual editor – WP will escape it to HTML: &lt;!–nextpage–&gt; and display it literally (instead of pagination): <!–nextpage–> So, check your post by switching to Text editor. If nothing isn’t displayed at all when you view the post, this may … Read more

Add Pagination in custom loop

source : How to fix pagination for custom loops? <?php $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $args=array( ‘post_type’ => ‘gadget’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => 24, ‘paged’ => $paged ); $temp = $wp_query; $fp_query = null; $fp_query = new WP_Query($args); if ( $fp_query->have_posts() ) : while ( $fp_query->have_posts() ) : $fp_query->the_post(); /* DO STUFF … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)