Articles of meta value

Show posts of an advanced search form

I have created a search form with multiple fields, and I want to display the posts that match all the fields inserted in the search form. For example, if I choose T-shirt && Red && L, I have back all posts with T-shirt as meta_value t-shirt, and all posts with Red as meta_value, and all […]

query_posts with meta_value

I have category ‘news’ http://localhost/foldername/news, for each ‘news’ posts I have custom field called ‘years’ and is set up as a Text Field. I have 2 values assigned n different posts ‘2013’ and ‘2014’. What I’m trying to do first to show only 2014 posts in ‘news’ category http://localhost/foldername/news and second to pass url parameter […]

How to get its meta_value of a specific meta_key within wp_usermeta

Using the S2member plugin, a meta_key for the last-payment-time is automatically stored in WordPress DB under table wp_usermeta (custom field is called wp_meds2member_last_payment_time). From wp_usermeta, the column called meta_key has a value ‘wp_meds2member_last_payment_time’. But the content I’m trying to collect is its meta_value equivalent. I didn’t find how to call this meta_value to the function […]

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 “Femme”. I’m trying to write a wp-query to display all posts […]

Sending new registration meta values to admin by email

I’ve created a custom registration form which accepts extra fields like mobile number, address etc and stored into user meta values. This is working fine, now I have to add a functionality of sending email to admin with all the meta value details whenever a new user registers on the site.

Is it safe to add a new field to meta_value field?

I’m trying to offload WordPress images from my web server. I’ve successfully moved everything over to Amazon AWS and have a syncing mechanism in place that uploads new images to AWS. Now I would like to store a flag somewhere that indicates whether the image has been synced so my custom theme can pick the […]

get value from selected input

here is my situation, I have different input, each of them them having a <input id=”q1a2″ type=”radio” name=”q1″ value=”1″ tabindex=”-1″> <input id=”q2a1″ type=”radio” name=”q2″ value=”3″ tabindex=”-1″> etc those value are being taken from an Advanced custom field like: <?php if( have_rows(‘answer_three’) ): ?> <?php while( have_rows(‘answer_three’) ): the_row(); ?> <input id=”<?php echo ‘q’ . $i […]

How to order by multiple date meta_values?

I am trying to find some way when using WP_Query of ordering by multiple meta_values. I know I can order by multiple values and I know how to order by meta_values but I cant seem to figure out how to do multiple meta_values. Is it possible ?

How to use array in function to get only value I want

I am trying to work this function in wordpress theme the way where I can get value only what I want and not all to gather. I am not much familiar with using array in function so I need you expert help to make it works and I would really appreciate that. Here is my […]

List custom field values ​​in alphabetical order without repetition

The function below lists the custom fields as in this example: Frank Capra Alfred Hitchcock Woody Allen Woody Allen Frank Capra Pedro Almodóvar Pedro Almodóvar I introduce the values ​​in alphabetical order and without repetition. Eg: Alfred Hitchcock Frank Capra Pedro Almodóvar Woody Allen This is the code: <?php $movie_reviews = get_posts(‘numberposts=-1&orderby=post_name&order=ASC’); foreach($movie_reviews as $post) […]