Thanks @Marin Atanasov and @hobo to help me to solve my problem on stackoverflow. If you are interested you can check the solution here
The problem was in the way i wrote the query, because it needs quotes around the date (eg = '".$data_modifica_post."'
).
Related Posts:
- How to extend WP_Query to include custom table in query?
- Can wp_query return posts meta in a single request?
- Broken? WP_Query and “attachment” as a post type
- How to use the_posts_navigation for wp_query and get_posts?
- Secondary Sort (fallback) for WP_Query
- How to paginate attachments in a secondary query as gallery?
- How to stop wordpress to make the default query?
- WP Cron and wp_insert_post
- How to make an activities stream mixing posts and comments?
- Single page theme that uses pages for the content
- Order posts ascending with number in title
- using wp_query to return posts w/ comment count > 0
- Order by meta_key in custom post type doesn’t affect the query
- wp_transients | wp_object_cache VS SESSIONS & Cookies?
- How to hide post content/meta from everyone except the post author and admin
- Add a default meta_value to new posts
- WP query exclude post within the last month / only show over 1 month old
- Too many posts cause slow load when paginating
- When querying a combination of posts and other meta fields, is there a better solution than directly modifying the WHERE value?
- Order Posts by meta value AND published date
- Formulate a url to show posts with both taxonomy terms
- Set if condition with wp_nav_menu
- How to reduce the number of queries?
- WordPress Related Post by tags in Single.php
- List of the years with posts presented
- Return Taxonomy/Term Information with Posts (WP_Query/get_posts)
- Query custom post type by custom taxonomy (category slug)
- Advanced Taxonomy Queries WordPress
- Getting post revision and printing them on the post content site
- Use posts_groupby filter with part of string in wp_query?
- 1/3 of posts different class
- wp_query for multiple cities (multiple values in a metabox)
- get posts by meta_key from inside key of post meta
- Help optimizing slow WP_Query with meta_query
- Pre-Populate $wp_query settings with custom rewrite rules and custom template_redirect
- WordPress Blog Posts with Pagination inside a Page/Post
- exclude a post from wp_query loop
- Is_single() conditional tag returns null in query
- Limit home post to 10 without creating pagination?
- Is it possible to query a custom field where the value is between two fields?
- WP_Query args to show posts from specific custom taxonomy
- How to query woocommerce product by pricing? [closed]
- WP_Query Meta_key is text value and need to sort as numeric not working
- filter wp_query result with custom field values
- Posts in loop all show the same author when there are many authors
- If have posts a week old, display, else display a different loop
- WP_Query Results Issue with ACF
- Create a page template for “top rated posts” but show full content and not just a list
- Why tax_query in WP_Query not working
- All blog data on a page using custom query gives 404 for page 2 and onward
- construct complex queries with WP User Query
- How do I fit WP_Query arguments into a function?
- Add URL Rewrite Rule To WordPress
- localizing variable on front-page.php template fails but succeeds on single page and taxonomy archive
- Remove from array in WP_Query loop
- How can I detect if the current post is in this loop?
- wpquery via ajax
- Pagination problem by using WP_Query
- Why always one post missing
- Where is this query?
- Is there ANYTHING about this query that’s incompatible with WordPress 2.9.2?
- get all images from the wordpress media library with link to the post they are associated with
- How to merge multiple foreach into 1 foreach and sort by date
- Add metabox if there is at least one post available
- Custom Taxonomy – Modify Function to Get Child Category
- WP Query – grouping posts by same meta key, adding together values from another key
- setting offset to category number in archive page
- Retrieve all custom field values of a specific custom field metakey as an array, inside WP_Query
- posts_per_page not working in block
- Pass post ID to JavaScript outside the loop
- Query for current post
- Why does my output of get_the_ID() change after a wp_query?
- Loop through array of pages
- WP Query works outside a function, not inside a function
- Pull posts from all categories if quantity is not met?
- Query_post 5 post first / last of post_id
- View related categories in order of posts
- query only returning posts with already set custom field
- Multiple tax_queries: display posts titles from several custom taxonomie
- Using URL variables on a custom WP_Query
- Sorting posts by meta values: 2 different orders
- Escaping WP_Query tax_query when term has special character(s)
- How to get hierarchical number of custom taxanomy
- How to query images from a post to use in a slider
- Show parent’s child and also child’s, child on a page?
- Show posts in category
- Is there any difference between below WP_Query code snippets?
- Order by three custom fields (Y-m-d), then separate into yearly sections
- Both WP_Query and get_posts returning 1 post
- Fire query on ajax post url page
- using next-page and previous page inside a wp_query
- Custom query from all posts & all child page from one parent page?
- What is wrong with this pagination code?
- wp_query conditionally get posts
- how to add limit records in wordpress query
- query only direct child and sub-terms of a current term archive
- restrict posts per page
- WP_Query by meta key not returning any posts
- WordPress extremely slow when using get_posts with multiple meta_query relations
- Search results stuck on page 1