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

learn more… | top users | synonyms (2)

0
votes
0answers
53 views

WordPress Page Template to Display Page Title, Custom Field, and Date

I'm currently attempting to create a page template that will display all posts by the current logged in user, a particular custom field from those posts (i.e., Item Status), and the dates those posts ...
0
votes
2answers
45 views

Get result from Custom Field in Custom Post type

If trying to filter out some return results from a custom post type that has a custom field appended to it for location. I'm not too sure where I need to apply the case statement in my query. Or if I ...
0
votes
1answer
48 views

How do I exclude posts by custom field value?

I need to exclude posts that have a custom field 'city' value of 'Melbourne'. After much searching I think the solution might consist of 2 parts. In functions.php : A function to get the post IDs ...
-1
votes
1answer
90 views

add comments custom fields after user is logged in

I want to add two custom fields inside comments on a CPT after the user is logged in on. This is the code for creating the custom fields: function debate_comment_fields( $fields ) { if( ...
0
votes
1answer
86 views

How to modify the query in taxonomy-custom.php to sort term archives by a custom meta field?

I am trying to create theme pages for custom taxonomy terms in which the archives are ordered by a custom meta field. I can do this with a new wp_query as follows: <?php ...
0
votes
0answers
114 views

Update Post Meta of crowdfunding plugin on click front end

I'm using the astoundify crowdfunding plugin which has a lot of custom fields while creating a campaign. I'm trying to create a save and preview functionality on that page. There are at least 20 ...
0
votes
0answers
13 views

working with newest post from plugin

I am going to write a wordpress plugin which will execute when user submits a new post. Suppose, user wrote a new post and pressed the submit button. Now, I want to save the post as a txt file in my ...
0
votes
1answer
158 views

Unique Post Meta Values

I want to use Unique IDs like YouTube video IDs and WordPress post IDs in a custom field 'youtube_id'. I just created a front-end add post page and want to check if 'youtube_id' used or not used in a ...
0
votes
0answers
31 views

Add a custom field to post

I want add a column to my table wp_posts with name "address". So EVERY post have address like field. But i don't know how i can manage the save from Add Post(admin)... I have looked into hooks, but i ...
0
votes
0answers
26 views

Getting custom field values for Buddypress users

I'm trying to use xprofile_get_field_data to retrieve the data from certain custom fields for BuddyPress. I see them in the database, but I'm just getting an empty value. xprofile_get_field_data( ...
0
votes
0answers
54 views

wordpress meta_box data don't save

I made this metabox with an input item and two select items(a dropdown and a checkbox). When i write something in the input item or i select something it disappear when i update the post. Another bug: ...
1
vote
0answers
101 views

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); ...
0
votes
1answer
190 views

Gravity Forms Update post meta from template

I created a form called 'Books' which has the fields: Title (Post Title) Author Genre (Dropdown - fantasy, horror, drama... etc) ISBN Number Status (Dropdown - Default Option - Published, additional ...
0
votes
0answers
145 views

Adding Custom fields to woocommerce edit order page

I have a woo commerce shop selling dated courses... as the courses vary in content slightly (even if they are similar in content) and because we need to have courses listed in date order, (we have ...
1
vote
1answer
81 views

Custom fields in Permalinks?

I'm wondering how to add a custom field value to a custom post type's permalink? For example, I have the custom post file ex: cpt-cities.php, which handles registering the custom post type and all of ...
1
vote
2answers
71 views

How to get the db table row that has the biggest value in the meta value?

E.g. I have a meta field called car_number: So, normally I would try something like this to get this value: $car_value = get_post_meta($post->ID, 'car_number'); But the porblem is that I need ...
0
votes
2answers
528 views

get value in custom field with taxonomy

i have custom field (my_cf) for Taxonomy/Term, how i can get and output value with custom field for taxonomy/term? try use: $variable = get_field('my_cf', 'basic'); and then echo $variable; where ...
0
votes
1answer
45 views

how to show this part only in the single post page?

I have this part in my index-meta.php file : <ul> <li class="Source"><a>source:</a></li> ...
0
votes
0answers
75 views

Custom Posts Hierarchy? (State/City/Restaurant)

Question: What is the best way to create a hierarchy structure (also called parent/child relationships) between custom post types? For example, we currently have 3 post types: States, Cities, and ...
0
votes
0answers
59 views

Meta Box Data added to header redirect

I got a lot of my code from this post: Create more Meta Boxes as needed What I need to happen is the user input a code and it redirects them to a specific url. I know I'm grabbing the data correctly ...
0
votes
0answers
46 views

Set post title and slug from meta fields not working

I have a custom post type where I have the post title disabled. I want to set the post title and slug from some custom fields. I was using this and it worked great, but since I've upgraded by site to ...
0
votes
1answer
39 views

Edit different parts of a page seperately

I'm an experienced PHP developer without a lot of wordpress knowledge (yet!). I have to put together a fairly simple Wordpress page in the next few days. To get started I need to create a custom home ...
1
vote
2answers
152 views

get_terms that have custom sticky field checked

I was able to add a extra custom field, named sticky, to a custom taxonomy, using the wp taxonomy meta plugin, like this: function YOUR_PREFIX_register_taxonomy_meta_boxes() { // Make sure ...
0
votes
1answer
37 views

How to use page metadata while using wp_list_pages()?

I'm creating my pages links in wordpress, using wp_list_pages(). each link contains an <i> tag which displays retina icons. I want to set a different class for each link in order to display a ...
0
votes
1answer
141 views

Custom Field - Do Not Show if Value is Empty?

This is the code I've added to a single.php file and I need to NOT display the Article Reference echo line, if the custom field value is empty. I am using Genesis, if that matters. How should this ...
0
votes
0answers
55 views

Sticky (or any boolean field) taxonomies?

I would like to add an extra field to a custom taxonomy, wich I would use a little bit like sticky posts, this way I could have a menu with some special taxonomies, is that posible? I can't seem to ...
1
vote
3answers
186 views

Custom Posts Types as Custom Fields

I have three Custom Post Types: Book, Volume and Chapter where one Book can contain many Volumes and one Volume can contain many Chapters. I want to do something like this: The user access "Books" ...
0
votes
0answers
70 views

Wordpress sort custom field values in alphabetical order

I am using WordPress Custom Content Type Manager to build a Literary Agency website. The page I'm stuck on is the Authors page which displays thumbnails of all the books related to the author. The ...
2
votes
2answers
82 views

Custom field losing p tags on display

I have a Custom Post Type that has several custom fields. One of the fields is multi-line and includes text with p tags. When I view this field in the visual editor the p tags are all there. I ...
0
votes
0answers
112 views

Custom field template missing for some custom post types

I'm completely new to WordPress and I am supposed to maintain a website made by someone else. This website has multiple custom post types. For each custom post type, there is a custom field template. ...
-2
votes
1answer
86 views

Good practical way to do loop within loop to show child custom type using a template code

I'm using Version WP e-Commerce plugin 3.8.12.1 I used a custom post type "event" with multiple value field "event_photos" and the field type is wpsc-product. To show a single "event" use ...
0
votes
2answers
118 views

Validating custom meta boxes with jQuery results in posts being saved as draft instead of published post

I have a custom post type with a bunch of custom fields. I want to validate the meta box input with jQuery as soon as you press the Publish button. Here's what I have (I left out all my validation ...
0
votes
0answers
38 views

Gravity product fields to custom post type

I tried using Gravity Forms + Custom Post Types (http://wordpress.org/plugins/gravity-forms-custom-post-types/) to add a product field as an array into a metabox of a custom post type, but the option ...
0
votes
1answer
136 views

Any way to update_post_meta with html content? It gets stripped and becomes empty

So I am cloning some divs created from an array using jQuery. Here is an example. I have a drop down list that contains items to add to the meta box. The add button clones a hidden div based on the ...
0
votes
2answers
246 views

unlink() doesn't delete the uploaded file

I'm using this code in my plugin to add an extra field to the user profiles so that the user can upload an image. It uploads the file perfectly but the only problem is the part that has to delete the ...
2
votes
1answer
108 views

Custom Meta Field - Youtube embed

I created a custom meta field and I want to use it to embed a youtube video into the post. It works but when I post a code like this: <iframe width="640" height="360" ...
0
votes
1answer
72 views

Running a Gallery Shortcode in a Custom Fields Widget

I am creating a website for a Fringe Adelaide Venue, we have planned on displaying a gallery on each artist page. We are already using Custom Fields to place some unique content in a Custom Fields ...
0
votes
0answers
82 views

Custom Field: Display only if a specific key is selected outside the loop

I might be doing this all wrong. I have a custom field called "enable_adsense" and the value can be either "yes" or "no" What I'm trying to do is display something if the value is "yes" and something ...
0
votes
2answers
102 views

comment meta_query for keys that aren't yet set

I need query help! I am trying to set up a meta_query (for get_comments) for keys that aren't yet set. I have some code that allows moderators to add a custom meta key to individual comments. Click ...
1
vote
1answer
152 views

Add description text under input field for new profile fields

How can I modify my following code to add some description text under the input fields? I tried modifying it as you can see with the facebook url field but the text shows up under the field label and ...
0
votes
1answer
102 views

Add custom data (field) to sidebar widgets for later display

I am building a theme that allows widgets to be dragged & dropped, essentially turning WP into a desktop-like environment where the admin controls what "apps" are available via the widget panel. ...
0
votes
1answer
85 views

How to get specific post meta by title or id

I have register bellow custom post type in function.php and I am using Advanced Custom Fields. Using advance custom field type I have added one image field and assigned to my Release custom post type. ...
0
votes
1answer
65 views

Custom field value link title

I need help with auto detecting the URL's title. The links I am going to use a link to the current website's blog posts. The code I have right now: <?php $custom_fields = ...
2
votes
1answer
637 views

How to Display ACF Relationship Custom Field as Link to Specific Custom Post?

OK. I am reading this ACF tutorials, but I am not getting into this. I have 2 post types: Lists and Contacts. Every List must be related to some Contact, and I use Relationship custom field type ...
0
votes
2answers
25 views

put saved metabox values back into fields and then display on the front end

i have a group of metaboxes which i finally are now saving but am struggling to get the saved values back into the input boxes they came from. so for example i have a meta field called link text and ...
0
votes
1answer
65 views

Custom meta boxes not saving

I am trying to create a custom meta box with 12 fields. there are 3 groups of 4 fields so i am using a for loop to create them to save on typing etc. for some reason i can't seem to get them to save. ...
0
votes
2answers
137 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 ...
0
votes
1answer
405 views

How to insert multiple checkbox values into post as custom fields from frontend

I need to use a form in the front-end that allows people to post. I have tried to keep the minimum code in order to focus only on the issue (mentioned below) at hand. EXAMPLE FORM: <form ...
0
votes
1answer
610 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 ...
0
votes
1answer
69 views

Compare WP Custom Field date

I had create a custom field "date" with this format 16/09/2013 (d/m/Y). How can i compare date and show only post with date from today ? This is my query that don't work !! $args = array( ...