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

How to filter comments by comment_meta

I needed to use new WP_Comment_Query and set my $args to show only this post, with the meta attached. Hope this helps someone! <?php comment_form(); if (have_comments()) : ?> <div class=”container”> <div class=”btn-group flex”> <button type=”button” onclick=”window.location.href=”https://wordpress.stackexchange.com/questions/406158/<?php echo the_permalink();?>/?cmeta=ALL””>SHOW ALL</button> <button type=”button” onclick=”window.location.href=”<?php echo the_permalink();?>/?cmeta=BUY””>BUY</button> <button type=”button” onclick=”window.location.href=”<?php echo the_permalink();?>/?cmeta=SELL””>SELL</button> <button type=”button” onclick=”window.location.href=”<?php echo the_permalink();?>/?cmeta=TRADE””>TRADE</button> … Read more

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