I’m not sure why you’d want a post you’re already looking at to be in the similar… but off topic I guess.
You ask it not to include the $current_id
in this line here
if ( $score > 90 && get_the_ID() != $current_id ) {
Related Posts:
- WP_Query vs get_posts
- Query Custom Meta Value with Increment
- Should I reset $wp_query?
- Ordering Posts by parent category, name ascending
- When should you use WP_Query vs query_posts() vs get_posts()?
- Some doubts about how the main query and the custom query works in this custom theme?
- How to query for most viewed posts and show top 5
- WP_Query: query posts by ids from array?
- Order posts by ID in the given order
- Too slow when using both ‘tax_query’ and ‘meta_query’ both in WP_Query
- pre_get_posts with get_posts
- Get the number of posts from the current page results
- How can I save an array from a random post sequence for later use?
- WordPress Custom Query to show posts from last x years
- Identify which loop you are hooking into; primary or secondary?
- Perform query with meta_value date
- Transient pagination not working properly
- meta_query on a date range using an array of values
- Pass the same object to multiple widgets in a template with one query
- Splitting the main query in multiple loops with query_posts and/or pre_get_posts?
- How to Loop within a Loop (Display Children and then Grandchildren)
- Retrieve or Query Pages by ID
- How do you query wordpress posts using a math formula between multiple meta field values?
- How add a custom posttype name using ACF field to a query post array
- How to implement time filter to show random post 1 month for one category and 3 months for other categories
- Page navigation doesn’t show when query category
- 2 loops on page – one with orderby rand second orderby date
- Undefined WP_Query::has_posts()?
- Create ONE callback for all page templates, post filter queries + paginated pages, triggering pagination via AJAX
- if/else on custom query gives 200 OK when condition not met?
- Minimize database queries to user tables?
- How to query a custom post type with a taxonomy filter but display post type archive page?
- Five posts from a category in footer
- Change query_posts to WP_Query in page but does not work
- Multiple loops without repeating content
- WP_Query condition affects posts_per_page count
- Query last updated posts (posts updated in the last 24 hours)
- Weird orderby => post__in issue
- Slow page loads due to WordPress Core Query
- Order by empty custom field
- Check if loop has any categories?
- Some doubts about how the main query and the custom query works in this custom theme?
- How to get list of posts from permalinks?
- Query Page Content From Theme Options?
- Query all posts if multiple meta key don’t exist
- How do I rewrite this loop as a new WP_Query style-loop?
- Transient api Caches confused
- How can I override one post and make it display content for another post?
- How to provide meta_key array to wp_query?
- Filter post query to only show direct children of category
- get_posts output always same post
- How to create custom query by keyword in post title?
- How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post? [closed]
- Conditional operator OR not working with custom fields
- Get posts that do not have the same tags as current
- How to filter query loop block with a search string from the query parameters
- How can I comment comma-separated array values?
- How do I add a relation parameter to my filter query?
- 2 queries with counters
- I am officially missing something about transient posts
- Why doesn’t my WP Meta Query return any results?
- Paginate pages with dynamic query
- Performance concerns: index.php vs taxonomy-$taxonomy.php
- Determine if ID is page or post and query the ID
- Custom template for password protected page
- Filter products on category AND tag
- Duplice post with standard WP loop – fixed by using query_posts() instead
- pre_user_query vs pre_get_posts
- How do I stop the same post showing multiple times in a archive?
- Get posts that match defined arrays of tags
- Loop through array of pages
- Custom query for custom post type not getting correct post ID
- Problem with my loops
- I need query_posts() to order results first by a meta value and then by post ID
- WP_Query & Duplicate entries
- Repeat array inside array through while loop
- WordPress For Loop Prints Unwanted Extra Paragraph Element
- How to show post title in content editor in backend?
- My entry results are not consistently alphabetized
- How to order posts, that have already been filtered by custom taxonomy, by their category names?
- How to add in WP_Query to every 3 posts displayed? [duplicate]
- query_posts() doesn’t seem to be called in my page
- Some doubts about how the main query and the custom query works in this custom theme?
- WP_Query secondary query failing
- wp_query – Modify $query to include duplicate content
- Optimising specific Query with ACF meta objects
- Iterate through ID’s in loop
- How to get several fields from wp_query?
- Loop through multiple custom fields with increasing number
- Issue with WP_Query (need a array of selected ID’s)
- Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?
- How to organize a WP_Query’s list of posts by category and display category title?
- meta_query dates from an array
- Converting an existing query_posts to WP_Query
- WordPress Query showing multiple titles
- Query Posts by date range with fixed beginning and end
- custom query to get posts
- Multiple loop for “featured” items returns wrong posts
- Woocommerce set loop_shop_columns to be 3 in the main shop page loop only and 4 otherwise
- Show number of posts AND number on current page (cannot make it work)