Questions tagged [custom-fields]

WordPress custom fields: author-entered post metadata

Related links

WordPress Documentation: Custom fields

1518 questions
7
votes
2 answers

Using Custom Taxonomy Term ID for Custom Field

I have created a custom single-sermons.php template file for my sermons custom post type and want to include the sermon speaker image custom field of the sermon speaker for this post. Custom Taxonomy ID: sermon_speaker Custom Field ID:…
7
votes
5 answers

Advanced Custom Fields - show on all pages

Is there any way of making Advanced Custom Fields(ACF) to set a rule = "ALL"? So that this specific group shows up on all page types?
Nabil Ghulam
  • 201
  • 1
  • 3
  • 12
7
votes
2 answers

Custom fields on java enum not getting serialized

I have a Java Enum as shown below: public enum ExecutionMode { TYPE_A, TYPE_B, TYPE_C; private ExecutionMode(){} //no args constr- no really required private boolean incremental; //has get/set private String someStr; //has…
Nik S
  • 73
  • 1
  • 4
7
votes
3 answers

How to add custom field to custom post type?

Good morning. I have created a custom post type called 'Products'. I want to create a custom field (is metabox the correct term?) where my client can tick a box to determine whether a given post within this CPT is a featured post. Here is the code…
6
votes
4 answers

Wordpress: Get all values of a custom field

I'm using Verve Meta Boxes. I want to make a menu out of one of the custom fields. How can I return all of the custom field values? For example, if I had a custom select field called "fruit" and as options I have "apples", "oranges", and "bananas",…
Imaginary
  • 313
  • 4
  • 12
6
votes
2 answers

Django end-user defined fields, how to?

Possible Duplicate: Django dynamic model fields Good Morning guys! Scenario is the following. For some models on Django, I would like to allow the end user to define his own fields. It would be great if I could keep all Django awesome features…
Clash
  • 4,896
  • 11
  • 47
  • 67
6
votes
1 answer

Cart item price calculation, based on chosen "days" custom field in Woocommerce

In Woocommerce, I use custom fields to calculate the price of a product, based on this thread code: Display product custom fields as order items in Woocommerce 3. // Add a custom field before single add to…
Dmitry
  • 119
  • 1
  • 9
  • 38
6
votes
1 answer

Add a mobile phone field on My account > edit account in Woocommerce

my question: How to add mobile phone field in Woocommerce my-account/edit-account/ page (Related template: form-edit-account.php file) Like in the following answer thread: Saving the value of a custom field phone number in WooCommerce My account >…
ahmadwp
  • 228
  • 1
  • 4
  • 15
6
votes
3 answers

Add a custom field value below product title in WooCommerce archives pages

In WooCommerce I would like to add custom text to my products display, that will be grabbed from a custom field in product's edit page. This is how it looks now: You can see the products with their title below: I would like to add a text below…
Yatir
  • 153
  • 2
  • 2
  • 9
6
votes
2 answers

WP_Query orderby meta_value_num not working

I'm trying to show list of services by price. I have setup the custom post type and custom fields etc. However, when I run the query on the page the most expensive service (£100) displays first instead of last... The query I've written is…
jonny-harte
  • 357
  • 1
  • 7
  • 16
6
votes
3 answers

Generating filebeat custom fields

I have an elasticsearch cluster (ELK) and some nodes sending logs to the logstash using filebeat. All the servers in my environment are CentOS 6.5. The filebeat.yml file in each server is enforced by a Puppet module (both my production and test…
RamenCoder
  • 358
  • 1
  • 2
  • 16
6
votes
3 answers

WordPress: Exclude posts with meta_query - Not every posts has the meta_field

I want to exclude every post with a specific value of a custom meta field. The problem is, that not every posts has this meta field. My code looks like this (excerpt of the working loop): // WP_Query arguments $args = array ( …
Cray
  • 5,307
  • 11
  • 70
  • 166
6
votes
4 answers

How to remove Custom Field section from Wordpress?

I am trying to remove custom fields section from Wordpress backend. I think I found a function that display custom fields. The function is located in wp-admin/edit-page-form.php line 181. do_meta_boxes('page','normal',$post) when I remove the…
Moon
  • 22,195
  • 68
  • 188
  • 269
6
votes
2 answers

How can i make custom field value required ( compulsory ) in woocommerce product page when adding product

I have added custom text box field in my add product page in woocommerce. Now i want to make it required (compulsory). I tried it by passing argument "required"=>true. but it is not working. Please see below code woocommerce_wp_text_input( array( …
Vidhi
  • 2,026
  • 2
  • 20
  • 31
6
votes
2 answers

Django & South: Custom field methods are not executed when doing obj.save() in a data migration

In my Django model I have two fields, name (a regular CharField) and slug, a custom field that generates the slug based on a field name passed in the field definition, in this case I use name for this. First, the model only had the name field, with…