Custom Fields are fields that can holds arbitrary extra information known as meta-data.

learn more… | top users | synonyms (2)

0
votes
3answers
1k views

Get single image from custom fields made with WCK custom fields creator

I used WCK Custom Fields Creator to create a repeatable custom field for uploading pairs of images (one color, one black and white) to posts. So for example, one post may have three fields, with two ...
0
votes
0answers
34 views

Create product configurator

I am building a product configurator tool where users can select mutually exclusive/inclusive options and I want to store their configuration at the end for retrieval later. As the user selects option ...
1
vote
1answer
161 views

Woocommerce - How to populate custom select field with stored values on checkout page?

I have converted the postcode field in checkout to a dropdown field. Its working fine. $fields['billing']['billing_postcode'] = array( 'type' => 'select', 'label' => __('Locality - ...
0
votes
0answers
20 views

WP_QUERY with alternating post types and pagination [duplicate]

I want to show both regular posts and a custom post type (event) on the homepage in a single loop. The event post type needs to be ordered by a custom field for the event date and show future events. ...
0
votes
0answers
14 views

why is the value of one field different from another if they are filled with the same variable?

A form is submitted containing a users email address. When the form is submitted, the page that processes the form creates a new post, and it sets the value of the custom meta field called 'entryCode' ...
0
votes
2answers
26 views

If metabox fields has content display content

I am try to hide the metabox fields with empty value like $Product_Brennwert = get_post_meta(get_the_ID(), 'Product_Brennwert', true); if ( ! empty ( $Product_Brennwert ) ) { echo 'Brennwert '. ...
3
votes
1answer
50 views

Can I count the number of users matching a value in a multiple value key?

I'm trying to find the number of users having a certain value in a custom field. The problem is that this custom field allow multiple values. This code works well when the meta_key allows only one ...
0
votes
0answers
36 views

Wordpress Image details extra field under caption

Can I have an extra field on Wordpress Image details under caption ? I have seen a lot of tutorials and code snippets for adding WordPress Media Uploader custom fields but I couldn't find any ...
0
votes
0answers
26 views

Order by meta_value_num issue

I am using meta_value_num to get the list of teams by their ranking, it working fine in 1,2,3,4 etc position, but in case of 11th, 12th, 13th etc position it consider them as a second position, the ...
0
votes
1answer
35 views

Convert all dates stored in custom field

I have a custom field to store the date of games, and I store it in database like mm/dd/yyyy Now I need to convert all dates to dd/mm/yyyy So how can do that? Is timestamp a solution for it, if ...
10
votes
5answers
7k views

Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title

I'm working on a custom taxonomy term page template where we want the items that are connected to the term sorted by a publication date (custom date field) - and if there are multiple items on the ...
5
votes
3answers
6k views

Using TinyMce with textareas in meta boxes on custom post types

I am trying to use the http://www.tinymce.com/ plugin to add a tinymce to my textareas in my meta boxes I have created. I've googled other ways and either I cant get it to work or didnt grasp the ...
0
votes
0answers
40 views

List authors by first letter with letter per page

Currently I have this working with first letter of post title with letter per page. <div class="alpha_navigation"> <div class="inner_alpha_navigation"> <?php foreach ($letters as ...
0
votes
0answers
158 views

Add custom fields from Woocommerce Attributes in check out page

I've added some custom fields, using ACF, for attributes in Woocommerce. So when you add an attribute you can add some more info. I achieved to show them in the product page but I can't find a way to ...
1
vote
1answer
55 views

Masking Affiliate URL using $post_slug after “/go/”

I am trying to figure out how can I redirect a masked URL based on a custom field URL. If I have a masked URL: echo '<a href="https://domain.com/go/'. $post_slug .'/" class="button">Click here ...
0
votes
2answers
28 views

ORDER BY custom field value

Based on example here https://make.wordpress.org/core/2015/03/30/query-improvements-in-wp-4-2-orderby-and-meta_query/ I'd like to modify the query $q = new WP_Query( array( 'meta_query' => array( ...
0
votes
1answer
49 views

ORDER BY custom field value out of where clause

Based on example here https://make.wordpress.org/core/2015/03/30/query-improvements-in-wp-4-2-orderby-and-meta_query/ I'd like to modify the query $q = new WP_Query( array( 'meta_query' => ...
0
votes
1answer
35 views

Sorting posts by custom fields in meta_query

How to apply 'order_by' in WordPress query in the following example: I have a query to get all posts with custom field for event dates greater or equal current date. I can have up to 10 event dates ...
0
votes
0answers
40 views

Embed handler in custom field

I am trying to implement wordpress function wp_embed_register_handler() into a custom field. Using this instead of wp_oembed_add_provider(), for the urls I use do not offer oembed support. With help, ...
0
votes
2answers
198 views

How to show a gloabl message on a user profile page (in back end)?

I want to show a global message for all users in their profile page. I do not want to edit profile.php what is the hook to do this? Basically I want to add a div to show a paragraph below the ...
0
votes
1answer
59 views

ACF Relationship - Get Parent's Post Object

I've a few post that have ACF relationship field set up : - Post A - Post A1 - Post A2 - Post A3 Post A have a relationship that link to : Post A1,A2 & A3... Post A1,A2,A3 have their own post ...
0
votes
1answer
24 views

Extracting a TLD from the content and assign to custom field

I am trying to get the first instance of a TLD in a post and insert it into a custom field. For example with a post: Hi I am Bob. My website is http://bob.com and you can reach me at bob@bob.com ...
0
votes
1answer
53 views

WooCommerce - Order_itemmeta - Need to add meta_keys to table

I need to add 3 meta values to each order_item to the woocommerce_order_itemmeta table. Any suggestions how to create new meta_keys to be included in the table for all order items?
0
votes
1answer
21 views

I have a form with a custom button ,i want to add the field data to an database when clicking the custom button

So im new to wp/themes,and coding, but love it and love trying to build sites, I used the form from the theme, extracted only the email field and added a button on that field basically inside of that ...
0
votes
2answers
720 views

How to I make my post title link to a custom field

I have a custom field in my posts called post_bookmark_url which contains a link. I want the post title that is displayed in the excerpts on my home page to link to the post_bookmark_url rather than ...
4
votes
1answer
5k views

Order get_terms() By Custom Field

I want to order my categories like I order my pages. I've added an extra field called Order to my taxonomy, but how do I order my terms by this value? Adding and Saving my Order Value: /** Add New ...
1
vote
0answers
14 views

Change the main loop Wordpress impact on the server?

I used pre_get_posts to change the loop of my Wordpress site. The idea of this loop is not show posts I define an expiration date, whose dates are added in a custom field ( postexpiry ) . These ...
0
votes
1answer
32 views

manage posts custom column is not populating data from meta boxes

My custom post name is "employee". Here is the code for creating and populating admin columns. Columns have been created but it is not populating. Also, what is the meaning of the "10, 2" in action ...
1
vote
1answer
30 views

Get categories with posts by custom field value

I have a big categories tree (~2000 total subcategories)... And I have a lot of posts with custom field "city" (different values). I have created filter posts by "city" field. But I have problem with ...
1
vote
1answer
44 views

First custom field value (out of several) displayed twice after query

I have the following piece of code, which is based on the solution to this question: <?php $game_titles = get_terms('game'); foreach($game_titles as $game_title) { ...
1
vote
1answer
71 views

Last modified field for user profile?

Is there a plugin or a known way to track user profile changes and save a last modified date in Wordpress? I tried with ACF, but it doesn't have an option to auto update this field. Thanks in ...
0
votes
2answers
33 views

Link FROM attachment to full post and get custom fields values on attachment page?

This shouldn't be so hard! But I cannot find the answer to this question on Google.. How can I link from an attachment template to the full post please? Bonus question! How can I grab the custom ...
0
votes
0answers
46 views

Filter Dashboard of Custom Post Type by Custom Field

I have created a new Custom Post Type and added a new Custom Field to the Dashboard Table: add_filter('manage_edit-my_custom_post_type_columns' 'addNewMyCustomPostTypeColumns'); function ...
1
vote
1answer
53 views

Two near-identical custom field types - one works, the other doesn't . What can cause this?

I'm using Advanced Custom Fields to add meta information to a custom post type and in ACF I've created two different 'Select'-dropdowns - one is called 'series' the other 'classification'. I run a ...
0
votes
0answers
19 views

Add wordpress category id to user meta with button

I want to know which categories my users are most interested in so I want to add a button to categories theme so if they click it that is saved to user meta. Similar to this: Let user subscribe to ...
1
vote
1answer
33 views

How to load an assets based on custom field value?

How can I load an asset based on custom field value? - This would be outside of the loop, all I can find for this is in the loop related functions, which I'm not familiar with, or what I find are ...
-2
votes
1answer
36 views

Grouped Custom Meta Fields without plugin

I need to add grouped multiple custom metas. I did it with CMBII plugin. But if it's possible, I want to create it without any plugin.
0
votes
1answer
60 views

Upload files programmatically to users

i'm using pods plugin to add new custom fields to user so i added 4 files custom fields and then trying to upload files to this fields from registration page and create new user but when i upload the ...
0
votes
1answer
730 views

How can I output the custom fields wrapping with HTML

I am trying to publish custom fields created using the plugin "Advanced Custom fields". I am able to display them on posts and custom post types as raw output. But I want to wrap html around the ...
1
vote
0answers
40 views

displaying and sorting comments by a custom field (using PODS plugin) [closed]

In my blog, i answer comments inline by editing them to add "admin says: blah blah". i do this so i won't bump up the comment count with all my admin comments. I am using the PODS plugin to add a ...
0
votes
0answers
76 views

Create select dependent dropdown by meta values or categories

We had 3 custom fields Brand Model Features (multi input in an array ) need dependent drop down form when select Brand (or Category) > show drop down menu contain all Models (related to this ...
0
votes
0answers
26 views

Strange issue with custom fields not showing data for certain posts but working fine on others

I have a very strange issue with custom fields on my site. I am using the custom fields for custom post types. So lets say the custom post type is called "cars". I will have various custom fields like ...
0
votes
1answer
2k views

Query_posts with custom field meta value

I have these requirements: If the child page has featured_product and the value equals to 1 then it's featured. This works. If the child page has featured_product and the value does not equal to 1, ...
1
vote
2answers
56 views

Determine when a custom field was last updated?

Would anyone know of a way to determine when a custom field for a post was last updated? I'm trying to write something that says "If CUSTOMFIELD was updated in the last 24 hours don't do anything, ...
0
votes
1answer
2k views

Display thumbnail from custom field

I have a custom field called picture. On the media settings page I've set thumbnail size to 100x100. If upload an image called gecko.jpg, WordPress automatically resizes it and generates ...
3
votes
1answer
56 views

Add options to featured image

I want to add an option to the featured image metabox. I have found a way to do this here The problem I'm having is saving the value tot the database. Here is what I have tried: add_filter( ...
1
vote
2answers
674 views

Get a post_id where meta_value equals something in a serialized meta_value field

I'm storing CPT products' post IDs into CPT companies' post meta (meta_key = prefix_products). As a company can have multiple products, so I'm storing them into a PHP serialized array value. ...
0
votes
2answers
4k views

Creating a custom menu/widget area

I'm looking to create a /menu/widget area like the following site: http://www.microsoft.com/en-gb/default.aspx please see sections under downloads, security, support, about is this considered a ...
1
vote
2answers
2k views

Add source URL from Feed WordPress (Syndication) plugin to a custom field in post editor

We're using the Feed Wordpress (Syndication) plugin to ingest external feeds resulting in posts published in WordPress. The plugin pulls the 'source' URL from the feed. We can display the source URL ...
1
vote
0answers
27 views

automatically set “Featured Image” the same as the og:i that is set in a custom field

I currently have a site that uses the "custom fields" feature to set the value of the meta property="og:image" for each post. All of my og:images are stored on an external server. I'm looking for a ...