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

learn more… | top users | synonyms (2)

-1
votes
2answers
551 views

extra post fields for url + youtube video / implementation

i'm using wordpress v3.1 and i'm requiring 2 extra fields for external url + youtube-link. is it possible? in case it's not - i was considering using own tags for the post-content and filter it out. ...
1
vote
1answer
815 views

How do I define post titles as images using Custom Fields?

I've tried to follow a guide that explain how to do so but failed and I don't know why it doesn't work. The guide: http://wordpress.org/support/topic/unique-header-image-for-each-post In my posts ...
0
votes
2answers
136 views

Value from custom field is not being displayed?

For some reason this custom field is not being shown in the page. This is the template file: <?php /** * Template Name: bbPress - Topics (Newest) * * @package bbPress * @subpackage Theme */ ...
7
votes
4answers
2k views

Extending the search context in the admin list post screen

I have a created a custom post type and have attached some custom fields to it. Now I would like for the search that authors can perform on the custom post list screen (in the admin backend) to also ...
0
votes
1answer
2k views

Populate a custom field dropdown with post titles by author

Just getting into wordpress and learning a lot! I know how to create a custom field and use it for basic purposes. I'm trying to do a little more now...I'm hoping someone can help me. Here is the ...
1
vote
2answers
1k views

post meta data clearing on autosave

For starters I am using this GREAT answer to achieve custom post types as well as a custom way to insert those post types into other pages, you can view that answer here: Custom field/meta populated ...
0
votes
2answers
203 views

custom post data - how to

We're setting up a site to showcase a series of archival recordings. We have the custom post types sorted out thanks to all the help from this site (many, many thanks): add_action( 'init', ...
2
votes
3answers
510 views

Custom post type / custom fields

I'm working on a client site and need the following: A custom post type called 'Agreements' On the Agreements edit panel, show a list of "Offices" checkboxes. Users can select multiple Offices per ...
0
votes
2answers
1k views

Custom Fields to Category edit page, then displaying them in a template correctly

Seem to be having a few issues with this project lately so sorry for spamming questions! I needed to give the category edit page in the admin a few additional fields to allow my client to manage them ...
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
424 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
827 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
628 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
5k 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
260 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
688 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
455 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
666 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
370 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
845 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
922 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
781 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
248 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
948 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
719 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
303 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
948 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
360 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
583 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
282 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
815 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
394 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
357 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 ...
11
votes
5answers
10k 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?