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

learn more… | top users | synonyms (2)

0
votes
1answer
2k views

Adding tinymce to Custom Field boxes on Category edit page

I've managed to add the required custom fields to my category edit page (the code is below). All I'd like to do it have the textareas #Category_Extras_Features and #Category_Extras_Applications to ...
0
votes
3answers
4k views

How to get the image-URL from Media-Upload in a post?

I generated a new MetaBox for all standard posts in WordPress 3.1. There I generate a input:text field with the ID _meta_fotos[pic], which should hould the image url generated by the standard ...
0
votes
1answer
443 views

How can I modify RSS item titles to be either the title or a custom meta field?

I'd like to optionally replace some RSS item titles with a headline meta field I've added to certain post types. I have the post types showing up in the feed using: function myfeed_request($qv) { ...
0
votes
1answer
145 views

Is there a way to display content from a post meta box in the sidebar?

I'd like to display content from a custom meta box that appears for a particular custom post type in the sidebar, when a single post of that type is being displayed. I know how to normally display ...
2
votes
3answers
857 views

Community and User Generated Content Website: Have been thinking about Drupal but leaning on Wordpress heavily

I'm a non-programmer and run a food website (plain - jane Dreamweaver) along with a simple Wordpress powered blog. I envisioned creating a food website that is both user powered (one can submit ...
11
votes
4answers
7k views

what is the correct way to compare dates in a WP query_posts meta_query

I have a query_posts call in a WP template. Through the use of the More Fields Plugin I can give the site admin the ability to create an event (custom post type) and then enter a date which is ...
2
votes
1answer
663 views

Truncating custom fields

I'm using custom fields to pull a secondary description. I'd like to use the built in WordPress truncate but can't seem to figure it out. $desc = get_post_meta($post->ID, "youtube-desc", true); ...
3
votes
2answers
7k views

Convert jQuery Datepicker Format to SQL Date Format

I set the jQuery Datepicker format to D d.m. displayed as Th 3.3. for a custom meta field that I want to use to sort posts. In SQL, the custom meta field is saved as D d.m. I would like to display ...
1
vote
1answer
6k views

Query Posts or Get Posts by custom fields, possible?

If I were to take a standard query post. <?php query_posts('post_type=payment'); while (have_posts()) : the_post();?> Only this time I would like to query the post by 2 custom fields that it ...
3
votes
3answers
265 views

How can I avoid re-inventing the Custom Fields wheel in my Plugin's Metabox?

Here's the scenario: In my plugin, I want to have a metabox show up on the post / page editor. I want the metabox to be -exactly- like WordPress' 'Custom Fields' metabox, ( Add another, delete, ...
2
votes
2answers
3k views

How to get and edit custom fields if in Quick Edit

I've got some custom fields that I would like a user to be able to edit in Quick Edit, I can manage the columns but I'm unable to edit them if Quick Edit is clicked current code with custom fields I'd ...
0
votes
1answer
694 views

get_post_meta of multiple posts?

I'm trying to get the key values for multiple posts with get_post_meta but am having no luck so far. In short, I have a function that adds 'votes' and 'thevoters' to each post. I want to check to make ...
1
vote
1answer
466 views

user Profile meta value as custom field

I would like to add custom fields automatically to all my custom post types weblogs based on data from the author profile field. My code: function add_custom_field_automatically($post_ID) { ...
0
votes
1answer
687 views

Post excerpt in custom meta box… help with proper php format

I have a custom meta box attached to a post type that displays ways for customers to submit new ideas. Customers are supposed to summarize their idea in 30 characters or less, which seems like a good ...
0
votes
1answer
375 views

Copy price categories to custom field

I have just made a big mistake today using a plugin to convert my 1000+ price custom fields into child categories under Price. I didn't know the custom fields will be deleted after the conversion. ...
0
votes
1answer
889 views

Sort category page with custom field

This is similar to another question I asked, but I can't recognize how this query string works. I have a custom field called "category_order" and I would like to sort my category page by this order ...
0
votes
1answer
2k views

get all posts with certain meta data

I'm developing a plugin made on the original calendar. My wordpress is based on real events and I want to keep trace of theme on the calendar. So I added a custom field in the post which is the end ...
1
vote
1answer
930 views

Sorting posts ordered by custom field value

I have a series of posts (using a wp-zoom theme). I would like to create a custom field called order and sort by that field. Here is part of my homepage code: <?php $z = ...
0
votes
1answer
392 views

Users uploaded image and matching an id or taxonomy

I have many posts with a unique reference for a custom field [123456], over time I would like an administrator to upload a single image that matches the custom field ie > 123456.jpg I would then like ...
1
vote
3answers
4k views

meta query not showing any results?

I'm trying to show result for a custom field that is not empty on a custom post type but getting no results? <?php if (have_posts()) : ...
0
votes
2answers
789 views

Filter or order based on custom field

I have added a custom field to some posts called 'frontpagerank' The plan is to order the posts by this value but first I just want to filter out any that don't use a front page rank. I have achieved ...
1
vote
2answers
4k views

query_posts and only show results if a custom field is not empty

How do I query_posts and only show results if a custom field is not empty or has a value. I want to put in a url in a custom field and only show these pages if there is a url? current code but I ...
0
votes
1answer
253 views

Use update_post_meta to older posts

It is possible to use the function update_post_meta on older post? I have + 1000 posts and I need to update posts using update_post_meta but I'm affraid to do it one by one. Is there a simple way ...
1
vote
2answers
998 views

Automatic Refresh all posts at once

I created a function to save custom fields on publish a post. Something like this. function create_fields() { global $post; $casa_id = $post->ID; ...
1
vote
1answer
748 views

Author custom fields post meta, the code?

If I wanted to get a custom field of the current user I would use something like this. <?php echo get_user_meta($user_info->ID,'address_line_2',true);?> This time however I want the author so ...
0
votes
1answer
135 views

Add custom fields from different posts

I am trying to add up custom fields from different posts. The array I created is not working. Here is the code. <?php $totalpricearray = ...
2
votes
1answer
307 views

template_redirect for single posts w/ custom fields

Is there any way I can use is_single() inside of my plugin's functions.php file? Currently, this is what my code looks like: if(is_single()) : function my_template() { include(PLUGINDIR . ...
1
vote
2answers
1k views

Count how many posts have a custom field set

I've added some code to my templates which automatically adds custom fields to cache some data that each post pulls in. Is there a way that I can track how many posts have had this custom field set?
0
votes
1answer
367 views

How to make a pulldown menu display custom meta terms in a theme?

I have a pulldown menu in a custom write box that classification numbers. How can I populate a select box on the front end that will: a) be populated with all the possible values defined in the ...
3
votes
3answers
3k views

Add new “Insert Into Post” button with another function

Problem: Add a hook that automatically adds a short tag to video attachments when inserted from the Media Library (video) tab: Update: This works under the 'Media Library' tab — and doesn't break ...
1
vote
1answer
598 views

How do I modify the “Insert Media” lightbox in the admin to only show media items from a category?

I am attempting to resolve a problem I continue to have with the media library. Essentially, what I am looking to do is "automatically" assign media which is uploaded from a custom post type "edit ...
0
votes
3answers
127 views

Am I overusing custom fields (for adding nearly 5 images and their titles)?

I never used custom fields so I got a bit exited. I'm not sure if I'm overusing them: (I'm using them to display the title of images and images themselves. (big and small ones). I used to do it ...
0
votes
2answers
284 views

How would an if statement surrounding a custom field with two variables (holding values) look like?

This is from the codex: <?php if ( get_post_meta($post->ID, 'thumb', true) ) : ?> <a href="<?php the_permalink() ?>" rel="bookmark"> <img class="thumb" ...
0
votes
2answers
846 views

Custom Field is getting the value of another page/post instead of the current one?

I'm using this same come in two files: single.php and home.php: (Outside of the loop). (There is a #mainbar div in both single posts and home page but the image should be different) <?php // ...
1
vote
2answers
73 views

Is it better practice to use 'This Name Format' or 'this-name-format' for custom fields?

I've seen in various tutorials where people white the custom field Name in this fashion: intro-image. I thought I would make more sense to use (user friendly names instead of something that looks like ...
0
votes
1answer
402 views

Custom Page Template [closed]

Could somebody help me make a custom page template? I'd like to have a basic page (with sidebars, header and footers) and a table for data. I'd like the data to be taken from custom fields. ...
1
vote
1answer
359 views

Making custom field's 'Name' available in the dropdown list by default in a theme?

My single.php file has the following code: <?php // Set and display custom field $intro_image = get_post_meta($post->ID, 'Intro Image', true); ?> <div class="block-1"> ...
4
votes
3answers
9k views

Filter by one custom field, order by another?

I have a custom post type "Listing" and I want to get all Listings that have a custom field gateway_value != 'Yes', and order the results by another custom field, location_level1_value. I can get the ...
0
votes
1answer
170 views

Display additional user fields

A theme is in development that echo's fields from the users account on their themed account page. This is the standard format. <?php echo $current_user->user_lastname;?> Thats all well ...
13
votes
5answers
11k views

getting all values for a custom field key (cross-post)

I know how to get a custom field value for a specific post. get_post_meta($post_id, $key, $single); What I need is to get all the values associated with a specific custom post key, across all ...
5
votes
1answer
17k views

How to enable custom fields for pages (if not a bad practice)?

My main page has a intro image beside the main content. I would like to add that image using custom fields. I've noticed that pages don't have. I would like to enable them. Is it a bad practice?
0
votes
1answer
187 views

Custom Meta Data is not being saved

I have created a custom meta box using following link in wordpress 3.0: http://farinspace.com/how-to-create-custom-wordpress-meta-box/ I am using same code and custom meta data is not being saved. I ...
0
votes
3answers
247 views

Solve product properties with custom taxonomies?

I need to add about 50 properties to a product, such as heigh, width, location etc. I created custom taxonomies for every property and ran into serious problems. First of all, the UI is a mess! Every ...
1
vote
1answer
2k views

Saving custom data for each user

I allow users to save some notes on my wordpress site. They can only do this after they login to the site. Now I want to save their notes in a database table and associate them with the user's id ...
3
votes
2answers
1k views

adding custom fields to next and previous post link

Im trying to make my next and previous post buttons display my custom field but for some reason it doesnt display the custom field its just blank. Heres my code. <div id="next-prev-links"> ...
2
votes
2answers
1k views

Correct Approach for Validating Custom Field Input

I have a custom post type with several custom fields. I am looking to do some validation on these fields because they will be used downstream by other services. So, it is important that it can't be ...
2
votes
2answers
2k views

Retrieving values of custom fields in Quick Edit mode

I've been trying to add a field to Quick Edit. Somehow it works: it is displayed and if you enter a value in the input field, the value is saved into a custom field. However, can't seem to find a way ...
4
votes
1answer
2k views

How to order adjacent posts (prev / next) by custom field value?

I am using the More Fields and More Types plugins to create a custom post type called product. This custom type is based on the Post type. One of the fields is named lot which is an integer ...
1
vote
1answer
996 views

Use WP 3.1 Internal Linking 'widget' as a meta_box

There is lots of information out there on how to customize meta boxes added with add_meta_box(), such as enabling WYSIWYG editors on textareas and uploading images. What I have yet to find is a way ...
-1
votes
1answer
1k views

WP insert post PHP function dynamically generated Custom Fields

Further to my previous question WP insert post PHP function and Custom Fields We have a working insert post function that can also send over custom fields without yet knowing the ID. Please see the ...