Questions tagged [meta-key]
109 questions
0
votes
0 answers
Getting meta_values of single post
there is an add to favorites button on my single post page. These records are recorded in the wp_postmeta table as follows.
meta_id
post_id
meta_key
meta_value
27685
2036
_favorites
, 1,2,3
27686
2035
_favorites
, 2,4,5
How can I get…

Kreawich C
- 3
- 1
- 2
0
votes
1 answer
MySQL NOT LIKE '_%' not working on Wordpress woocommerce wp_woocommerce_order_itemmeta large database
I'm trying to search a Woocommerce mysql database for values that don't begin with _ however when I use
WHERE meta_key LIKE '_%'
this works perfectly, however when using
WHERE meta_key NOT LIKE '_%'
this yields 0 results despite executing without…

Henry Aspden
- 1,863
- 3
- 23
- 45
0
votes
2 answers
Wordpress meta_query how to use "like" comparison on meta_key
I have to get posts having a particular meta value for a dynamic meta key.
The meta key values will be:
_project_global_1_trend_link
_project_global_2_trend_link
etc...
The common text in meta key is trend_link. So I need to add like operator for…

Vishnu Sasidharan
- 72
- 1
- 2
- 11
0
votes
1 answer
Woocommerce : How to add a custom meta_key to checkout billing_phone?
I want to enter the value of digits_phone meta key to be entered as billing_phone for every woocommerce order.
I came up with something like this but it did not work :
//Automatically add the digits phone number of the user, to woocommerce orders…

Erfan
- 23
- 8
0
votes
1 answer
How to order by multiple meta keys with WP_Query?
I'm stuck with this since this morning.
I’m trying to order with two custom key in a custom post type.
$args = array(
'post_type' => 'my_new_post_type',
'meta_query' => array(
…

popcorn
- 1
- 2
0
votes
1 answer
Meta Query within a Meta Query?
I'm trying to query 'live' posts for 'venue' field existing (venue field is ID's of venue pages). Query those venue IDs/posts for which ones have a field 'country' that's value (ID) matches a specific country value.
$shows = get_posts(array(
…

50dollanote
- 189
- 4
- 4
- 12
0
votes
3 answers
Group similar meta_key values and create result set with meta_value data
I have fields that look like…

Luu Hoang Bac
- 433
- 6
- 17
0
votes
1 answer
Query in Wordpress of a Custom Post Type with the postmeta
I am trying to make a wordpress shortcode with a query.
I have to make a query of how many orders were made of the products in the last day and in the last week.
I don't know how to filter by date (the date is also in text format).
Thank you very…

EmanuelAA
- 11
- 4
0
votes
2 answers
How to make meta_query according to dynamic meta_key values in Wordpress?
I'm trying to list some users using the get_users function.
An online learning plugin I use saves some data in user metadata as course_COURSEID_access_from. For example; If the course ID is 123, the metadata is saved as: course_123_access_from. And…

Faruk
- 53
- 11
0
votes
1 answer
Update post meta before display post
I have a function to update the post meta for a post. Is it possible to perform this function and update the meta key so that when the post is displayed, the meta key has already been updated?
So update meta key before post display.

Tom Harisond
- 57
- 1
- 10
0
votes
0 answers
Meta Keyword problem for my Laravel website
I have a Laravel site.
While I use site::http://lasermedicalbd.com/ I have got a search result like below image.
Here are lots of meta keyword with different languages those I am not using for my website.
I can't understand why and how those…

Arafat Rahman
- 993
- 5
- 19
- 46
0
votes
1 answer
get meta_key out from ACF repeater field
Is it possible to loop through wordpress posts by a repeater fields content?
I have a event where you can add events through a repeater field (ACF) and I would like to show all dates for each event.
How do I do that?

horrobi
- 1
- 1
0
votes
1 answer
How to delete specific meta_key filed and their value(s) from UserMeta table in WordPress?
I have added
"add_user_meta( $userid, 'last_login',$current_login_time);"
instead of
"update_user_meta( $userid, 'last_login',$current_login_time);".
Now scenario is I have plenty of MetaKey fields as 'last_login'.
Please advise how can I…

amitdutt24
- 67
- 2
- 10
0
votes
1 answer
how to order wordpress search by meta key values?
During search in 2 meta key( say acf hr_archive_title and acf hr_archive_question ), I want to list down post in following order.
first preference is post with searched text found in hr_archive_title
then posts with searched text found in…

samjhana joshi
- 1,995
- 4
- 35
- 69
0
votes
1 answer
conditional logic for css if a selection field (with meta_key) have specific value using ajax/jquery
I have a selection field with a meta_key (for example:'text_style') and 3 values (for example:'normal', 'bold', 'italic'), and an element after it (for example: a div with a text in it).
Now i need to update "changeable-class" for each values, when…

magic-boy
- 11
- 6