Thanks guys.I did it with WP_Meta_Query (https://codex.wordpress.org/Class_Reference/WP_Meta_Query)
Solution:
<?php $query = new WP_Query( array(
'meta_key' => 'j4cob_yaz_ayarlar_show_on_slider_',
'meta_value' => 'show-on-slider',
'posts_per_page' => 6
) ); ?>
<?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
.
Loop
.
<?php endwhile;
wp_reset_postdata();
else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
Related Posts:
- custom-meta-box checkboxes from loop won’t save
- Display metabox title for custom fields with values
- get wordpress post loop by meta box date
- Get meta value when the page is a blog archive
- I want my post to republish again after adding a custom field
- Custom field/meta populated by dropdown of existing posts?
- What is the index [0] for on post meta fields?
- Individual Widgets per Page
- Gutenberg add a custom metabox to default blocks
- ‘Preview Changes’ for custom meta boxes?
- Using TinyMce with textareas in meta boxes on custom post types
- add meta box – custom field : which to choose?
- Add metabox to document tab in gutenberg
- How to add add_meta_box to specific Page Template?
- Custom field metabox not showing in back-end
- How to hide meta box values from custom fields list?
- Adding another state (spam, reject, approve) to wordpress comments?
- Arrange custom fields with drag and drop?
- How can I avoid re-inventing the Custom Fields wheel in my Plugin’s Metabox?
- Unable to get Preview of Uploaded image within a Custom Meta box
- Using media-upload.php to upload mp3 via custom fields
- extend Meta Box / Document Panel
- Add custom option to Standard Page Attributes Meta Box
- How to store the value of a custom field dropdown select for post referencing?
- Add multiple images to a page sidebar
- Only show metabox when date-value in other metabox is over?
- Custom Meta Boxes: Store two values in one repeatable field
- Order posts by custom field and if custom field is empty return remaining posts
- Populating meta box with select-list of existing posts, and assigning it to custom post types
- Create meta boxes that don’t show in custom fields
- How To Create a Metabox of HTML Content with Instructions For Editors When Editing a Post or Page?
- How to load php file for specific page in admin?
- How to set default metaboxes on user creation?
- Metabox nonce PHP notice
- TinyMCE in Custom Metabox not loaded after upgrading from WP 3.1.4 to WP 3.2
- wp_editor in add_meta_boxes does not show gallery
- Calling Specific Pages with wp query Part II
- How do I assign this filter to a variable? (Appending php & markup to the_content)
- Problem in custom meta boxes
- Loop through two different sets of custom fields
- Multiplile values checkbox or select in custom meta box
- Create custom field key upon theme activation
- Problem with adding exta field in metabox in custom post type
- Adding a custom field or metabox to the post-thumbnail widget?
- Custom fields to save multiple values
- How do I add custom_meta_box_id’s value?
- Undefined index error when saving content on metabox
- How to save multiple metaboxes?
- Metabox with multiple fields added by user and upload box
- add meta box using function.php
- Metabox image upload and custom field
- Display custom post on home page based on a metabox selection
- all tincymce’s switch when updating page after changing from html to text in custom metabox
- My metabox class
- wp_handle_upload error “Specified file failed upload test” but still creates attachment?
- How to construct multiple meta boxes
- Loading scripts to the Post Edit page only
- Force hide custom field metaboxes
- How do I exclude posts by custom field value?
- Echo values from custom field outside loop php
- Woocommerce with metabox plugin
- wp_editor removes paragraph from custom meta box
- How to Display Custom Meta Box only on Specific Page IDs
- Upcoming Event: How do I sort database by custom date field, but ignore past dates?
- Calling custom fields for pages (not posts)
- Duplicate posts being displayed when querying Custom Fields
- WP Custom Fields Metabox Disappears – ACF plugin issue [closed]
- Metabox will not save
- How to check for specific meta box value on front end and output accordingly
- Loop to display random posts only if a custom field matches category
- Where did the Add New Custom Field go?
- How Meta Data is different from Custom Fields of POST/PAGE in WordPress
- Admin meta Image Path
- Tweak Meta for Post to work it for Pages also
- Odd PHP Code To Display HTML Of Meta Box [closed]
- How can I show custom fields in the loop only to specific user roles?
- get_posts that match a user-specified value on a page
- custom field not saved
- Accessing loop functions (e.g the_title or the_content) from post ID
- How to create a Custom Meta Box with Name/Value Admin User Input Fields?
- Create Multiple File Upload Metabox in WordPress
- Users Select inside custom metabox
- Custom Metabox Not Saving
- Better Method for Multiple Meta Boxes
- how to fetch the meta field keys/meta boxes from a post type?
- How to Create Dynamic Fields in a Meta Box?
- Set front page option using custom fields?
- Should custom meta boxes be able to output shortcodes the same as WordPress’ native post editor?
- Can’t get metabox value (a url) returned using WPAlchemy
- Unsaved changes in metabox inputs not detected in the block editor
- Limit the number of acf content when displaying in post loop [closed]
- Custom Meta Box (SELECT) Not Saving
- Get updated meta value after post update or published (custom post type) using hook
- Is there a better way to list all database terms alphabetically?
- Button inside Custom Meta Box triggering the Update Button
- Why is my Custom Meta Box Field Inputs NOT saving?
- Change the main loop WordPress impact on the server?
- How to show a post if was published less than two hours ago?
- List users by sum of all their posts’ custom field values
- Custom Metabox additional item