Articles of custom field

Multiple Frontend Filters Using Advanced Custom Fields

I’ve got a series of custom post types set up, and a large amount of custom fields are linked to these post types via the Advanced Custom Fields plugin. I want to set up a series of checkboxes on the frontend to filter posts via their custom fields. This is what it looks like at […]

How to save the date/time of last update of an extra user profile field?

I have a function that adds and saves very well an extra field to the user profile. But, because the content of this field gets old very quickly, I need to know when the user refreshed it last time – only this specific field, not the whole user meta data! I need to know if […]

Possible to filter custom post type with multiple meta data?

I’m wondering if it’s possible in one loop to accomplish what I need to do. What I would like is to sort all custom post types by the meta data of county and put them in order which it is doing here. But I would also like it to then sort by acres within that. […]

Custom Post Fields at the beginning of a Custom Permalink

Is there any way to have a permalink begin with a custom post field? For example, the follow works: $wp_rewrite->add_permastruct(‘solicitors’, ‘/anything/%custom_field%/%custom_field_2%’, false); But this doesn’t: $wp_rewrite->add_permastruct(‘solicitors’, ‘/%custom_field%/%custom_field_2%/’, false); It seems that every page aside from city pages get redirected to the homepage when the custom field placeholder is placed first. When a manual text item […]

Is there any way to add a “custom field” to the CPT archive page?

as per my title I have a CPT with an archive. I’d like to have my archive main page (the back end) displaying two custom fields that would allow me specifying the “meta tag description” and “page title” for the archive page itself (and not the single post underneath). Clearly I can’t add a custom […]

Custom fields on a virtual page

I’ve used Dave Jesch’s solution for making virtual pages (from content temporarily saved in a custom database table, updated from an RSS every four hours). See more here: So far I’ve verified that the url looks like one of a virtual page (i.e. it’s the child of a certain slug and it contains numbers […]

Custom Field to a Role?

Is it possible to add custom field to a custom role? Say I want to create roles that represent a membership level and want to add billing options to it. So it’d look like this: Membership level (Custom Role) | Billing options ———————————————————– Free | Null Basic | Monthly, Quarterly, Yearly Pro | Yearly, Bi-yearly […]

Query Custom Post Types by date (custom field) range

I’ve seen similar questions and solutions, but so far I couldn’t apply it to my code. The following code (functions.php) works perfectly fine: if( isset($query->query_vars[‘post_type’]) && $query->query_vars[‘post_type’] == ‘turniere’ ) { $query->set(‘orderby’, ‘meta_value_num’); $query->set(‘meta_key’, ‘date_start’); $query->set(‘order’, ‘ASC’); } Now I want to add a sort of date range. This is the “best” I’ve got so […]

Linking Custom Fields to Database Records

Hey there im fairly new to wordpress and php, but have a strong programming/database background. I recently learned about custom fields and am wondering if it is at all possible to do the following with them in conjunction with database tables… I want to be able to display a picture and name value for the […]

Trying to sort and display categories(not posts) by custom field: 'order'

I’m a WordPress rookie. I’ve added a custom field to my “Category” taxonomy. The custom field is “custom_order” and its purpose is to hold a number so that my categories can be sorted and displayed in the order I choose. My problem is that I can’t get them to sort; I can display the categories, […]