Remove “#comments” from comments pagination url

Somewhere in your theme template is a call to the_comments_pagination(). If you would look at the source code, you could find the declaration of that function: function the_comments_pagination( $args = array() ) { echo get_the_comments_pagination( $args ); } There are two things to note here: This function is passing its call through to another function. … Read more

What does this if-statement do?: if($pages=’ ‘) {}

$pages is an optional parameter. If not set, $pages will equal an empty string. So if($pages == ”) checks to see if that parameter has been set. In this call, the parameter has not been set: kriesi_pagination(); In this call, the parameter has been set: kriesi_pagination(5); In the tutorial link that you posted, read this … Read more

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

Pagination not working properly

Don’t use query_posts in the template. If you delete that line, your template will paginate correctly. If you want to alter the main query, use the pre_get_posts action. Currently, your query overwrites the default main query, and you don’t set any pagination parameters within the query, so you’re always going to get the first 10 … Read more

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