taker93
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: 500 error trying to access Updates and Plugin pagesI’m facing the same problem at the moment.
Another thing that’s not working ATM is the Jetpack-Statistics. There is only an error message showing with the following message:
http_request_failed: "cURL error 7: "
Edit: But only one of my sites is showing this error since a few hours. Others are working.
- This reply was modified 7 years, 7 months ago by taker93.
Forum: Fixing WordPress
In reply to: WP_Query returns post multiple timesFound out, that the problem was caused by wrong pagination. I disabled the inifinite-scroll script and changed the way of querying.
These posts were very helpful:
[resolved] Pagination with wp_query and custom post type
[resolved] infinitescroll and wp_query is repeating postsForum: Fixing WordPress
In reply to: WP_Query returns post multiple timesWell…the posts are somekind of unique now. BUT: Now I see the navigation buttons, which should not be displayed…
Thank you so far.
Edit:
Result without categories is still: Posts are not unique.Edit 2:
I tried:<?php $not_again = array(); $args = array( 'numberposts' => 4, 'meta_key' => 'ratings_average', 'orderby' => 'meta_value_num', 'order' => 'DESC','category_name' => 'showcase', ); $postslist = get_posts( $args ); foreach ( $postslist as $post ) : $not_again[] = $post->ID; setup_postdata( $post ); ?>
…
<?php endforeach; wp_reset_postdata(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if ( in_array(get_the_ID(), $not_again) ) continue; ?>
…
<?php endwhile; else : echo prpin_get_no_result(); endif; wp_reset_postdata(); ?>
Result is: Posts are unique. But “previous”-Button is being shown.
Forum: Fixing WordPress
In reply to: WP_Query returns post multiple timesHi Tejas,
thank you for the reply.
I’m already using
<?php endforeach; wp_reset_postdata(); ?>
at the end of the first loop.
I don’t know if i can use it at the end of the second because the theme uses Masonry.js . (somekind of infinite scroll stuff)