Is tets a substring?
So if a custom field has the value of: ‘This is a tets’
You would want to exclude that post?
Or is tets the name of the field?
update_post_meta(
$post_id, // Post ID
'tets', // Field Name
$value // Field Value
);
Both the above cases are possible it’s just clarification on which solution you’re looking for.
Thread Starter
mmdrog
(@mmdrog)
test is the name of the field !
i wanna find some post without ‘custom field name with test ‘
If the name of the field is test then you can query on the meta_key:
$posts = get_posts( array(
'post_type' => 'any',
'meta_key' => 'test',
) );
Thread Starter
mmdrog
(@mmdrog)
i really dont know how to use these codes
is there any plugin to show them ?
Maybe you can use this plugin. It looks like it has good documentation:
https://ww.wp.xz.cn/plugins/display-posts-shortcode/