Questions tagged [meta-key]

109 questions
0
votes
1 answer

How to get Meta_key In Wordpress Function?

I'm using plugin BAW Post Views Count to Count View Post. It here: https://wordpress.org/plugins/baw-post-views-count/ I want use query post (WP_Query) to get list most view post. I need use meta_key. But, this is meta_key i found in function of…
user6417934
0
votes
1 answer

Count posts based on more than one meta key value

I'm trying to count the number of posts where certain meta key values exist, in this case posts that have a key 'texture' with the value 'soft', and also have a key 'colours' that are 'red', 'blue' or 'green'. My code does not error, but it appears…
User_FTW
  • 504
  • 1
  • 16
  • 44
0
votes
1 answer

query post by author gender

I'm using utimate member plugin on my website. for each member (author), I have a field to store the member gender. (Homme / Femme). the data is stored in my database, inside wp_usermeta. meta key is "gender" and meta value is either "Homme", or…
mmdwc
  • 1,095
  • 6
  • 27
  • 53
0
votes
1 answer

Show posts that have a with a certain meta_key value or not meta_key at all

I've got this loop where I need to display all the titles of posts that have a certain meta_value, or that and don't have the meta_key 'the_status'. My posts currently use the meta_key called 'the_status' and can have either of these meta_key…
User_FTW
  • 504
  • 1
  • 16
  • 44
0
votes
1 answer

Wordpress in foreach loop updating meta values

I have done foreach loop to get custom post type to frontend. And i have one custom field called 'order_staatus'. When i look in front end my list in loop, i want to add one button what would change this certain post 'order_staatus' to different…
Rookie
  • 15
  • 6
0
votes
2 answers

Wordpress - WP_Query Multiple OrderBy Meta_Key

I want to output a list of guides, where each guide has votes and rating. So I want to sort the guide list by rating and votes. Example: Guide Name Rating Votes Guide1 10 3 Guide2 10 2 Guide3 10…
Antoine Dionne
  • 121
  • 1
  • 14
0
votes
1 answer

Order by custom field date, (year and month) wordpress

I have this meta_query , which is: A post type " newsletter " with a custom field I created called " date_newsletter " which would make the records of a year and month given specific and sort both by the " date_newsletter " field and also sort by…
user3810167
0
votes
2 answers

How to fetch meta_value and meta_key in matrix after ajax request by post_id

Well, I have 2 custom post types: A = Properties B = Property Owners Inside CPT Properties, I was created a Meta Box to: Search a registred Owner (CPT) by VAT number (CPF in Brazil) Relate Owner with de Property I have the CPTs and Meta Boxes. The…
Jeff Monteiro
  • 721
  • 1
  • 7
  • 17
0
votes
1 answer

Updating mate values by meta key for all posts

I want to update a meta value with a specific meta key out of wordpress page. What I want is that, multiplying a meta value with a variable then write the result to another meta value. for example; $var=5 meta_key|meta_value key-1 |10 key-2 …
Berk Koç
  • 15
  • 8
0
votes
0 answers

Consecutive queries in Wordpress

I am trying to display some meta_values and meta_keys of found post_ids from wp_postmeta table and the post_title of this ID from wp_posts table. Firstly I have to find post_ids (it could be more than one) from given meta_key and meta_value. Than I…
Berk Koç
  • 15
  • 8
0
votes
1 answer

Undo the effects of changing meta_key from Varchar to int

I was trying to edit the email form field so that it accepts int values like of a phone number. I knew very less about how database values work and this is what i did: 1. Figured out that email field was "hrb_email" 2. Found that in wp_metauser…
shrbisht
  • 676
  • 3
  • 9
  • 23
0
votes
0 answers

WordPress custom image loop

I would like to create a loop with images per post ID. These are custom images which are made by the theme I’ve bought. These images have a meta_key called “estate_property_images”. This is the code I’ve made, but post with no image are showing…
Caat
  • 77
  • 1
  • 6
0
votes
2 answers

Wordpress display ordered meta key

This is my code: posts.* FROM $wpdb->posts LEFT JOIN $wpdb->postmeta ON ($wpdb->posts.ID = $wpdb->postmeta.post_id) WHERE $wpdb->postmeta.meta_key = 'start_1' OR $wpdb->postmeta.meta_key = 'start_2' AND…
Avel
  • 111
  • 1
  • 2
  • 9
0
votes
1 answer

How can merge two arrays values in one array and save in database

I am working on WordPress upload meta fields. When user upload images the images are sized in two dimension one is "thumb" and one is "big" and they re sized very perfectly. I save both of images dimension path in database with different meta keys…
deemi-D-nadeem
  • 2,343
  • 3
  • 30
  • 71
0
votes
0 answers

Searching trough custom meta keys in Wordpress

I have this code to search trough my custom meta keys in Wordpress. Searching trough the meta key values is going well. Unfortunately when I search on a post title and there is only one result, the same post is displayed 8 times. How can I prevent…
Forza
  • 1,619
  • 3
  • 28
  • 49