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

learn more… | top users | synonyms (2)

2
votes
2answers
4k views

Edit Custom Database Tables in Wordpress

I have a site that uses custom database tables to manage info that is inserted by a process completely independent from Wordpress. The data from the table is used in the Wordpress site but it is not ...
0
votes
3answers
2k views

How Do I Display A Custom Field In The Sidebar Of All My Pages?

I'm using the Types Plugin for Wordpress and created a custom field. I would like to display this custom field in the sidebar of all of my pages. The problem is that it only displays in the sidebar of ...
2
votes
3answers
450 views

Only show metabox when date-value in other metabox is over?

probably a weird question. I'm using the custom MetaBox and CustomFields Class by jaredatch on Github. I have this "event-date" metabox: $meta_boxes[] = array( 'id' => ...
0
votes
1answer
1k views

wordpress get_post_meta / the_meta to output custom field value

What I'm trying to do is quite simple: I want to add a custom field named 'Button' to each post that will show a button (image) on the page with the value as its link. It's basically a button that ...
-1
votes
1answer
178 views

Media Custom Fields - get a value with PHP

How to get a value of a field set with Media Custom Fields (programmatically)?
0
votes
1answer
514 views

meta_box or custom_field as a second tinymce post-instance?

probably a rather weird question but I have no idea if this is possible or not!? I created a custom-post-type to handle events. An event always has a future date but once this date is over I want to ...
3
votes
1answer
2k views

add_meta_box: Datepicker like the one for postdate?

I've built a custom post type called "Events". Each event has a future date and I don't want to use the normal postdate of the post. I want to use add_meta_box to add some inputs for this ...
7
votes
5answers
2k views

Does Wordpress have a “Form API”

I do most of my development in Drupal, however I am working on a Wordpress site and I need to make a form. Which got me thinking, is there a Form API for wordpress like there is Drupal? Is there a way ...
0
votes
1answer
174 views

Displaying Posts Using a Custom Query with a Custom Field and a term_id

I'd like to display a list of posts in a category of a taxonomy using a Custom Field. Here's my code: if($current_term->term_id=='143') { $querystr = " SELECT wposts.* FROM ...
1
vote
1answer
42 views

What is the cleanest way to extract custom variables from a post

At the moment I am doing something like the following from inside the main loop; $custom_values = get_post_custom_values('tenderfields'); $custom_values = unserialize($custom_values[0]); ...
0
votes
1answer
470 views

plugin-list-category-post custom fields

I'm using list category posts and would like to display several custom fields, but not all together. I have used a template to display the list in a table, and have custom fields for country, county ...
2
votes
3answers
2k views

Metabox nonce PHP notice

I've been getting a notice when I try to add a new post in two different taxonomies, in one i use a custom meta box and in the other not, however the notice appears for both when trying to add a new ...
0
votes
1answer
320 views

How to Convert Custom Fields from Text to Array?

I want to convert my old post data containing custom fields that are stored in a text format like : name , url $ name, url $ name, url etc. I want convert that data and store the new data as an ...
0
votes
1answer
3k views

Display Custom Meta Box Field Only If Value is Present

I'm messing around with Custom Meta Boxes in WP for the first time and was wondering how I go about displaying the fields that only have values attached to it. For example I've got a meta box with an ...
1
vote
3answers
5k views

How to add multiple markers on the google map, at a certain meta_key and meta_value

I have over 200 customposts and each has customfields (add_city, add_state, add_location) in each custompost is googlmap with customfield (geo_longitude geo_latitude) Help please, display in googlmap ...
0
votes
2answers
4k views

How to implement jquery-ui autocomplete into custom fields?

I currently have a custom fields for enter State name. I want to use the autocomplete from jquery-ui in this fields. However, I failed. This is the first time I using jquery-ui, and I am not so ...
0
votes
2answers
832 views

How to use media upload on metabox post page without breaking TinyMCE?

I'm using the following code for upload in multiple mextaboxes in a post or page admin section. Works for metaboxes but breaks the TinyMCE insert image. I want to know please how I can achieve this ...
0
votes
1answer
215 views

How do I assign this filter to a variable? (Appending php & markup to the_content)

===I HAVE SOMETHING THAT WORKS NOW, JUST NOT CORRECTLY. PLEASE READ THE WHOLE POST, I AM GOING TO LEAVE IT ALL UP HERE BECAUSE OTHERS MAY BE ABLE TO BENEFIT FROM ME BUMBLING THROUGH THIS PROCESS!! I ...
0
votes
1answer
543 views

How to create Parent-Child relation for custom fields?

I am new in here. Hope that you guys can help me. Few days ago, I posted the same question on Wordpress.org support forum, however till now no one answer me, not even 1 reply. Maybe my issues is ...
2
votes
1answer
167 views

My metabox class

I'm using the class My Metabox class *-- Custom Post Init Begin --*/ function mypost_types(){ register_post_type('video', array( $labels = array( 'name' => __( ...
5
votes
1answer
579 views

Change behavior of “Insert into Post” based on attachment metadata

For a custom plugin I'm working on, I have added a checkbox element to the attachments editor in a manner like the answer provided here: How to add a checkbox element to attachments editor with ...
5
votes
2answers
11k views

Show values of custom field created with ACF on a page

Im using ACF to create custom fields. One of them is a list of checkboxes that display some options (option1, option2, option3....). and what i need is to show these options on a page in a list like ...
0
votes
1answer
62 views

How to query for posts with either one or another custom field

Need help querying for posts with either one or another custom field. Not sure how to use the 'or' operator here, but something like this the blow - Have tried these: ...
0
votes
1answer
496 views

Custom fields / meta box output

I have some custom fields added via a meta box, and I'd like to output them into a dl on the post itself, with the field being the term and the data it contains being the term. Currently, calling ...
0
votes
1answer
162 views

Create citation and url in post using 3 custom fields with conditions for each field… So close!

I am creating a new baseball blog. When submitting a post, I want Authors to cite their source for a news type of post. I have created a custom meta box with three custom fields: Source title, the ...
0
votes
1answer
1k views

How do i get the attached images with custom value checked?

I have added a custom field to the image attachement. When this custom field is checked the image will be part of a carousel on the home page. Now i am able to get the custom field to work and save ...
0
votes
1answer
676 views

Wordpress stripping out custom field tags

I am using wordpress get post meta to store the value of a custom field into a variable. In this particular instance, It is actually grabbing the post's parent's custom field due to the ...
0
votes
1answer
642 views

How do i save and retrieve custom attachment meta?

I'm trying to save if a checkbox inside of the media uploader pop up is checked, so i can retrieve it from the front end. I'm using this code: function filter_attachment_fields_to_edit( ...
5
votes
4answers
6k views

Attaching Metadata to a Taxonomy Item

I have a taxonomy of menus i.e. Coffee, Tea, Sandwiches, Cakes etc. I want to add more information 'about' the taxonomy such as an image that represents it alongside the other pieces of taxonomy ...
0
votes
1answer
737 views

Create an Array of Specific Custom Post Meta

I'm having an issue thinking today and ran into a brick wall. What I'm trying to do it take 3 different custom field data for posts and combine them into an array that I can then json encode for use ...
2
votes
1answer
2k views

Check before publishing, if already exist post with current custom field value

I have a custom post type with only 3 custom fields in it. $post_types = get_post_meta($post->ID,'post_types',true); $post_taxonomies = get_post_meta($post->ID,'post_taxonomies',true); ...
0
votes
1answer
758 views

Auto embeding Vimeo/Youtube in custom fields (tinyMCE editor)

I'm using 2 extra TinyMCE editors on my pages to add extra textfiels in my theme pages. I now realize that the auto-embed feature is not supported on content delivered thought custom fields. So i need ...
0
votes
2answers
3k views

WP_Query multiple use of relation and/or

I have 2 custom fields that I would like to do a meta query on for a custom post type: start_date status The outcome that I am looking for is (start_date >= 1332115200 AND status = 1) OR ...
0
votes
1answer
604 views

Front-end Image Upload to Custom Meta Box

I'm currently using a custom post type with a custom meta box for two image uploads. I'm trying to create a front-end post page where the user can upload their own images from their desktop. All of ...
1
vote
1answer
750 views

how do i remove posts from a WP_Query so the pagination is right?

I'm using a custom post type and showing 20 of them per page on the homepage. I'm using QP_Query. One custom field for the custom post type (called mixtapes) is a checkbox called "unreleased" (set ...
2
votes
1answer
49 views

Leader board for game on homepage

I've built a simple game which is housed on my homepage. I'd like to create a leader board (a small results table) which displays the top three 3 scores. How would i insert/retrieve the score data ...
2
votes
1answer
2k views

add meta box using function.php

hi does any one know how can i add other meta box and save the data in a different custom fields, using the code below. <?php function add_meta_boxes() { add_meta_box( ...
0
votes
1answer
583 views

Multiple Custom Field Query

I have a unique situation where I need to filter on 2 custom fields where 1st field is expiry and values of "" and greater than todays date are valid and 2 field is a number which should be greater ...
2
votes
1answer
127 views

Can ordering post list by meta_value cause performance issue?

For some code refinement and to add new features to my plugin, I want to display posts ordered by specific meta column value like this; query_posts($query_string . ...
2
votes
2answers
427 views

Plugin allowing for artists, events and venues

I'm working on a music festival website and up until now have used WordTour. I really like WordTour's artists > events > venues content hierarchy, but am having difficulties transitioning from last ...
0
votes
1answer
165 views

How show post only from after custom date

I have custom post type. In this custom post type I have custom field with date in format: 23/09/2012 How to show only posts, which currently date is before date from these custom field? Sory for my ...
0
votes
1answer
426 views

Custom Meta Box Upload Image Problem

Ran into a problem with an image upload part of a theme feature. The code uploaded at http://pastebin.com/Qnn2D36N (that's the entire script for adding the meta boxes) generates custom meta boxes on ...
12
votes
1answer
16k views

Add filter menu to admin list of posts (of custom type) to filter posts by custom field values

This answer is very close to what I am looking to do, but instead I would like to specify a specific custom field and display a select menu of its available values. Thanks!
2
votes
3answers
9k views

Return all custom meta data for one custom post type

I've set up a custom post type which has three custom meta fields: name, latitude, longitude. Each post already shows the name on an integrated map based on it's latitude and longitude. I now would ...
0
votes
1answer
156 views

How to grab data (titles, thumbnails and custom fields) from multiple posts to populate a new array efficiently?

I need to know the most efficient method to grab 3 pieces of data from from multiple posts: Post title Thumbnail Custom Field I am attempting to build a Google map of posts using data stored in WP ...
0
votes
2answers
784 views

How to disable Edit Post and Allow only Custom Field?

What I would like to know is if it is possible to disable the edit post function in wordpress based on User's roles. I try to explain better. Let's take an 'Editor' as role example: I would like ...
5
votes
1answer
6k views

How can I add extra attribute in the 'Page Attribute' section in wp-admin for pages?

I would like to add a select list in the Page Attribute box you see on the right side in the administration interface for pages. Does anyone know if that is possible? Or at least add a custom box ...
3
votes
1answer
940 views

How can I change the admin search posts fields?

I have a custom post type that includes many custom fields. I would like to add them as a search target to admin search. Currently the admin search searches only the content and the title, I would ...
0
votes
1answer
82 views

Best way to sort estates and query them (for rent? yes/no. contains office space? yes/no)?

I´m building a real estate site where Estates is a custom post type. I want to be able to tick a checkbox or something similare on the edit page, where I can choose if the estate is for rent, if it ...
0
votes
1answer
1k views

How do I list a custom field and custom taxonomies for each result in a loop?

How do I list a custom field and custom taxonomies for each result in my loop below? <?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); ...