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
- ‘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 can I avoid re-inventing the Custom Fields wheel in my Plugin’s Metabox?
- Add custom option to Standard Page Attributes Meta Box
- Only show metabox when date-value in other metabox is over?
- 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?
- 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 with adding exta field in metabox in custom post type
- Adding a custom field or metabox to the post-thumbnail widget?
- How do I add custom_meta_box_id’s value?
- My metabox class
- Loading scripts to the Post Edit page only
- Woocommerce with metabox plugin
- How to Display Custom Meta Box only on Specific Page IDs
- Calling custom fields for pages (not posts)
- Duplicate posts being displayed when querying Custom Fields
- 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
- How Meta Data is different from Custom Fields of POST/PAGE in WordPress
- Tweak Meta for Post to work it for Pages also
- get_posts that match a user-specified value on a page
- Create Multiple File Upload Metabox in WordPress
- Users Select inside custom metabox
- Custom Metabox Not Saving
- Should custom meta boxes be able to output shortcodes the same as WordPress’ native post editor?
- Custom Meta Box (SELECT) Not Saving
- Get updated meta value after post update or published (custom post type) using hook
- Why is my Custom Meta Box Field Inputs NOT saving?
- Change the main loop WordPress impact on the server?
- I need a “Choose from existing content” popin
- Outputing a metabox textarea and avoid line breaks inside li tags
- shortcode in a custom metabox
- Problem with saving large amount of data in postmeta/usermeta
- Move Title and the Content WYSIWYG editor position
- How can I hide custom field from users used for caching response from external api?
- How to use media upload on metabox post page without breaking TinyMCE?
- Displaying Meta-Box Data Properly
- Let’s Create Custom Field Template Documentation
- Can I save post meta programatically without setting metaboxes?
- do_shortcode close
- Search Results Page – Displaying Custom Meta Fields
- Meta box values are displayed on Custom Fields list. Is it possible to hide them?
- If metabox has content display content
- Custom meta boxes not saving
- HM CMB: Role Select
- Get meta field value of all catgories
- Interrogate a page within a loop to check template type or custom meta data (Pages vs Posts)
- How to store meta field values
- How to show content of custom fields in search results?
- use custom field value as post category in loop
- Make separate text boxes for separate WordPress Custom Fields
- Compare ACF date field (if exists) and post date and order DESC
- What am I missing in this Code Block?
- get_field values for each post on home page using wp_add_inline_style
- Set class if a meta value is set within post archive
- WordPress Blocks, setAttributes not saving
- Using Customizer API vs Custom Meta Box for custom content
- non-unique #_ajax_nonce id in browser console
- How can I ‘check’ the “custom fields” box from the Screen Options?
- Allow HTML in Custom Metabox area
- Metabox/Custom fields are not saving input data
- Custom field metabox not showing in back-end
- Issue on Creating Checkbox Field On Custom Post type
- WordPress admin area: select box with 12.000+ options
- How to display selected option from dropdown list in a metabox
- Save, update, get and sanitize post meta as HTML not plain
- Why does this javascript search function in the WordPress Admin not work?
- Custom meta boxes – add php code inside?
- Create Meta boxes dynamically
- Outputting custom field on home.php not outside of blog list
- Update custom table on metabox POST
- Save input form on custom field
- how to modify a field’s size in a metabox : ROWS height, and scroll control?
- Append custom field items to content from plugin
- When post is updated, custom metadata in text area field is overwritten
- Custom Meta Boxes and Fields for WordPress: Change directory upload based on user-edit page
- WP_query returns error when used for custom widget
- Can i categorise my meta box?
- Custom Metaboxes, multiple post selection
- added a meta box to post however when saving menu while debug on throws a warning
- When editing a post with a custom meta box the values aren’t displaying correctly
- loop through custom post-type with two meta_keys
- Filtering posts by WORD in custom field
- Use Metabox to enter Post Title
- Include custom fields into the content of a regular page
- How to get the value of particular get $meta value in wordpress
- Display custom field value into content with hyperlink
- Order by a meta field in query loop