This is the loop I’ve created to display post’s matching criteria on empty page:
// get results
$the_query = new WP_Query( 'meta_key=apaitei_logariasmo_facebook&meta_value=Ναι' );
// The Loop
if( $the_query->have_posts() )
while ( $the_query->have_posts() ) {
$the_query->the_post();
echo '<h3>'; the_title(); echo '</h3>';
the_content();
}
wp_reset_postdata();
It works. Look at the image:

Note: my site’s language is English with:
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
How do you know that your query returns no posts if you don’t display anything. At least the code you provided does not show it.
Related Posts:
- is_category() in pre_get_posts strange error
- Rearranging posts based on categories
- Custom Query to search through categories
- How to query all posts of a specific category, and any other category combination
- is_category in pre_get_posts results in php notices
- Query the Loop without breaking it
- How to Check if a Child Category is Being Queried
- How Do I Merge Categories With phpMyAdmin
- Category archive page – loop through posts of certain tag (with pagination) – pre_get_posts
- If newest post of category is newest post in general, skip first post of category
- Disallow categories from this MySQL query
- Include posts from feature category in pre_get_posts
- How to display posts under a specific subcategory of a given category
- get_the_category and echo out link to child-most/deepest category
- query in category.php repeats itself
- Display posts separated by Category in Author’s page
- Category param redirect to post type archive
- How to get related tags based on a category?
- Show popular post by category code
- How to get latest posts from each category in regular order
- category pagination got broken suddenly
- How to query categories with Advanced Custom Fields?
- Where and when does WordPress invoke routes
- And/Or Category Query
- Exclude category from query
- Overriding default calendar to show posts from a category
- function query_posts disabling current_page_menu class
- How Do I Delete WordPress Posts Older Than 400 Days, From A WordPress Category
- Using in ‘category_name’ in ‘$query->set();’?
- custom query for both category and pages using global $wpdb;
- Get categories of queried posts
- Query from multiple category (and)
- How to display posts from specific category using get_option function?
- SQL query to get posts from multiple categories but not in a category
- Conditional category query breaking?
- How to filter post from categories only if the posts appears in one of them, not the other?
- Category name for all posts getting assigned to a single random post
- Show Posts via cat+cat in URL that are in both Categories doesn’t work
- List of post categories only associated to another custom taxonomy
- how tho change number of posts in loop from specific categories
- Get category from slug list
- Issue with WordPress category search
- Querying posts from two different categories while looping inside another loop
- how to get postmeta info based on multiple categories?
- Too many categories drastically slow down my website
- How to get posts from many categories using WP_Query
- Is it possible to query the result of a query?
- show posts found in multiple categories via category_name query string?
- Match two taxonomies to display a specific content
- Category slug in in loop always the same?
- display certain category on custom template page
- Detecting top parent category fails on home page
- Displaying posts by year
- wordpress category.php query for featured news item, broken pagination and repeating posts
- How to show posts of a specific category
- How to get parent and child sub category (Taxonomy) order to display
- How to add featured image for category (without a plugin)?
- Category archive by year with permalink support /category/YYYY
- Create a category list page
- How do I use the same post slug for different Categories?
- Default WP Gallery – show only galleries of a certain category
- How to tax query X number of posts related by tag first, then by category if not enough in tag-related
- Woocommerce product categories order [closed]
- Exclude sub category posts from category display
- How to hide a specific category posts in my monthly archive?
- Automated adding of one tag to all the posts in a category
- How to set up sub-categories for author pages?
- Assign different category colours to different categories in the main menu
- Action hooks returning old category instead of new category
- Category checkboxes in upload modal
- wp_list_categories, Add class to all list items with children
- Using separator with wp_list_categories
- How to mass-insert categories?
- How to display only posts assigned to a particular, isolated, subcategory
- Get categories without post
- Display thumbnails for certain category posts
- Hide the word ‘category’ from my permalinks
- School & class blogs – renaming/archiving post categories?
- How to modify default category widget list display?
- Building Menu from Woocommerce Product Categories
- Is there a reason I cannot get the current category in a loop?
- List just subcategory and products of active category page in Woocommerce
- Custom Meta Box (SELECT2) Not Saving Taxonomy Terms
- Listing posts under a category by date
- Display content from a specific category using cat ID not working
- Deleting a category from WordPress admin does it remove it completely from the database?
- filter a loop base on specific category
- Last x Posted Categories?
- Category Page Displaying all Pages
- get_the_category return empty inside loop
- Possible to make get_categories() hide_empty attribute honor excludes from post query?
- Conditional Site Logo(Category Based)
- Tag Menu items based on their categories
- How to exclude a specific categogy from a custom page template
- Category Templates for Post Types not Working
- Change category base based on category
- altering theme – content generated by PAGES not PORTFOLIO
- have_posts is empty on category.php
- How to Organize my Photo Albums?
- Organizing pages into different categories/sections