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

learn more… | top users | synonyms (2)

2
votes
1answer
3k views

Custom Meta Boxes: Store two values in one repeatable field

I am trying to create a custom meta box where the user can add fields as needed. I followed this tutorial: http://wp.tutsplus.com/tutorials/reusable-custom-meta-boxes-part-1-intro-and-basic-fields/ I ...
2
votes
1answer
280 views

Create meta boxes that don't show in custom fields

I used the code below to create a metabox for posts. These meta boxes are also seen in the custom fields. I do not want these meta boxes to show in custom fields. Is there any way to not show meta ...
3
votes
3answers
3k views

Add custom option to Standard Page Attributes Meta Box

I'd like to add a simple checkbox option to the exsisting standard Page Attributes Meta Box. Is there an obvious/intended way to do that using the WordPress API, rather than registering a new ...
1
vote
1answer
607 views

Localized Date Format for Custom Field

I'm using a custom field, formatted with "dd-mm-yyyy". I would like to use it with the Date Format defined in the Dashboard settings. It seems alright in English with get_option('date_format'); Or ...
0
votes
1answer
590 views

How to programatically set the post title of a CPT on wp-admin

I've been playing with custom post types & custom fields, using a combination of the types plugin and the advanced custom fields plugin, also having done the same manually. Occasionally I want to ...
3
votes
2answers
241 views

Order Posts by Closest Numeric Values

I'm using custom post types to display properties and have a custom price field assigned to each post. On the property page I want to display a list of four similarly priced properties, two less than ...
1
vote
2answers
400 views

Validate data on attachment_fields_to_save

I'm very glad that there is such a dedicated website for WP. My problem is data validation upon saving attachment fields. I have added many custom fields to attachment/media library dialog, most of ...
0
votes
1answer
153 views

Get post ids sorted by meta_key

I have defined a post_view_count meta_key to store the number of post views. I would like to get an array of post ids sorted by post_view_count value to use in the functions.php file. Thanks.
1
vote
3answers
1k views

Is it bad to use a lot of Custom Meta Fields?

I am curious without doing a ton of benchmarks, how others feel about using several custom meta fields on a blog post? I am talking strictly performance wise, does it slow things down a lot if using ...
3
votes
1answer
827 views

Many to Many Relationship between Two Custom Post Types

How to I create a many-to-many relationship between two custom post types? Give type A and type B, I'd like to be able to show all B's that relate to a given A, and all A's that relate to a given B. ...
1
vote
1answer
653 views

Including Custom Meta with posts_where query

I have been looking around to see how to do this but the solutions i've found don't seem to be working for me. I'm making an AJAX powered search for some wordpress custom post types. I have got ...
0
votes
2answers
97 views

Only show <li> when content added via custom field

I've gone through a few of the other similar topics but any of the solutions won't work for me. Basically I only want to show an if the custom field has had information added into it. Here's my ...
0
votes
2answers
515 views

Nav Menu – Add class based on meta keys

I'm trying to find a way that changes the classes of the different nav menu items, based on the value of a meta key in the page. The menu currently looks like this: <li ...
0
votes
1answer
3k views

Custom “radio button meta box” not saving correctly

I'm having trouble with my "custom meta box/write panel" script that contains radio buttons. (see below)...It currently does not seem to save the selection made after publishing the custom post type, ...
4
votes
1answer
1k views

Update all posts automatically when using post_meta

I recently created a new site using wordpress but I'm a rookie - everything I know is trial and error with no formal training. So please, please, please keep your answers as simple as possible. Thanks ...
1
vote
1answer
164 views

Why do I lose the content of meta boxes when I leave the page?

So I've been coding a theme and I'm working on a custom post type. When I edit a custom post and save the changes (click Update) everything is ok. But - I noticed that when I leave the Edit page open ...
0
votes
1answer
534 views

Hide / Show Custom field depending of the page ID (Magic Field 2)

I use Magic Field 2 to display custome field on my page ! However, I would like to be able to hide several field depending on the page ID... I do not want to use custom post type because my website ...
-1
votes
1answer
144 views

How can I attach files without using a plugin?

I want to add files from my site or from external links with files to any of my posts, and be able to add the size of the file and choose which ones it will do "File Force" and which not. I want to ...
0
votes
1answer
1k views

Advanced Custom Fields WYSIWYG More tag

Before describing the problem, let me first tell that I have already searched on google, also read the ACF documentation, support, even asked on their support forum but it's hard to get any kind of ...
0
votes
2answers
485 views

Custom Fields Value As Taxonomy

I creating a real estate platform where allow users to add their listing. The users are people who may not know how to using wp platform, so I make it as easy as possible for them to make a post. ...
0
votes
1answer
791 views

Displaying posts with only upcoming dates according their custom field date value

I got posts that have starting date as a custom field value. I'm displaying few of those posts in my sidebar in ascending order so that the post with closest starting date is shown first. This is what ...
3
votes
2answers
3k views

Retrieving custom fields with $wpdb->get_results

I'm trying to use $wpdb->get_results to retrieve an array of all posts including custom fields. I can retrieve the meta_key and meta_value columns like this: [meta_key] => state [meta_value] ...
2
votes
1answer
472 views

Plugin to auto convert custom fields to tag

I have 3 custom fields that i would like to have automatically converted to tags anytime the post has them. Custom field names: tag_name1, tag_name2, tag_name3 Is there a plugin or function that i ...
0
votes
1answer
73 views

Custom PT, Taxonomys and wordpress query

Ok so I have an issue with wordpress that has been driving me mad the last few days. I have a custom post type called "help-line" this post type then has 13 categories and some of these categories ...
1
vote
1answer
225 views

How to add field above password section in profile page

I managed to create new custom fields in the profile page. However, the new fields are located below the Password section. My new fields is more about the user personal details, which should located ...
1
vote
1answer
303 views

How to stick custom post at the top in search results

I'm trying to stick a post in the search results for the value and meta_key meta_value. If the search results in the post is meta_key - sticky and meta_value - fatured, the display on top of these ...
0
votes
1answer
123 views

How to show certain data on certain interval of period

I have three sets of period of time, each with several interval of date: Event A Jan 1 - March 1 Dec 1 - Dec 31 Event B Mar 2 - April 15 Jun 1 - Jul 15 Sept 1 - Oct 15 Event C Apr 16 - May 31 Jul ...
0
votes
2answers
131 views

Confusion about how to use Custom Post Types, Custom Taxonomy or Category?

I've been reading about Custom Post Types, Custom Taxonomy and Category but I'm still getting some confusion. I want to build somewhat like an ecommerce site just to understand it better. Say I've a ...
1
vote
4answers
1k views

Adding set of custom fields to Wordpress Post in Dashboard

I am working on a WordPress site and while creating a new posts we have certain number of custom attributes which are always part of the post, as of now we need to manually add those all custom fields ...
0
votes
3answers
2k views

show custom field content in jquery tabs

I am trying to make a post which will contain several custom fileds. the custom fields should show within jqery tabs. I have already made it in here: ...
1
vote
2answers
1k views

WordPress Create Post from front-end

I'm having to design an e-commerce site where users should be able to create a product from front-end. In WordPress, the product will simply be a post with custom fields like Price, Condition,....... ...
0
votes
1answer
123 views

Need help with simple “if statement” checks to output particlular CPT data depending on what client uploads/fills out

In short, Im not a master of PHP yet and Im not entirely sure how to place a series of checks (if statements) in my template so that it will know what to display depending on what the client ...
0
votes
1answer
759 views

How do I include a template file while allowing it to render its own dynamic content added via custom box?

I have 3 theme files: header.php, navigation.php and page.php page.php calls header.php They both have content which is added to via a custom box. navigation.php has some content added to it via a ...
0
votes
1answer
1k views

Custom Post Type Meta Box Text Input Field Won't Save When Blank

I have some text fields in a custom post type that I fill in at first, but need to delete on a future update of the post. When I delete the text in the field and save the post, the text I deleted ...
0
votes
1answer
498 views

custom field output after the_content

What I want to do is output a custom field content (which is a button with a dynamic link that's being inserted in the value of the custom field of each posts) right after the_content and before the ...
0
votes
1answer
446 views

front end radio custom taxonomy with custom post type

Hi my good friends I need your help better than losing my mind, first I have to thank "Stephen Harris" for his good article , -second: After a lot of searching I still don't know how to inject a ...
0
votes
1answer
371 views

Update custom category fields front-end

Been using this answer -->> (link) to create some custom fields in my categories and it works great ! my only problem is that i have a frontend form that allows creating new categories with an ...
1
vote
1answer
65 views

Display the contents of a custom field of a page on their child

Let's see if anyone knows how to accomplish the following: I have a custom field, which is a textarea where the user can enter any text. The idea is that if a page is filled in that field, the entered ...
2
votes
2answers
3k 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
1k 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
2answers
426 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
496 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 ...
6
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
165 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
41 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
420 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 ...