I have a three custom fields Meta Key → YOUR_PREFIX_newcar_body_type Meta Key → YOUR_PREFIX_newcar_transmission_type Meta Key → YOUR_PREFIX_newcar_variant and I have to sort posts based on these custom fields...
I’d like to sort posts on the index page to show those that have a featured image first. I’ve done this in functions.php: add_filter( 'pre_get_posts', 'my_get_posts' ); function my_get_posts(...
i have a custom query, and I have a meta key that contains a sequence number: 1.1, 1.2, 2.1, 2.2… 11.1, etc the problem occurs when the numerical sequence...
I have been using a lot of Custom Fields to make WordPress like a CMS, beyond simple posts and post meta. The admin area for adding new posts has...
I have a requirement for displaying a list of custom post types grouped by category, but in addition to this, each custom post is linked with a meta value...
I want to bulk add a custom field (category) with value (photography) to all posts in a specific category (photography, with Category ID 5). I have used the code...
Hi I’m trying to pull posts using the wp query. Just one problem–I am trying to sort the posts alphabetically by a certain meta_value. Thing is that this meta_value...
I have a form on the frontend of WordPress which is saving all fields except a checkbox array. It displays and saves the correct values if I tick the...
@t31os gave a very helpful response to: getting all values for a custom field key (cross-post) by providing this function if ( ! function_exists( 'get_meta_values' ) ) { function...
I’ve written a custom function which works with the native WordPress custom fields function but I need it to work with the Advanced Custom Fields plugin. I have created...