Tagged Questions

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

learn more… | top users | synonyms (2)

3
votes
2answers
1k views

Custom field values deleted when trashing custom post type

I've created a custom post type with 2 custom fields attached to it... When I create a post of this type and fill in the custom fields, the data is, in fact, saved to the db... However, if I trash one ...
1
vote
1answer
89 views

Extra option in editor

I'm sure there's an easy solution to this, but I'm wondering how to add custom input fields in the Wordpress editor. My goal is to have an image uploader to the right of the main editor, when an ...
1
vote
3answers
270 views

query in category.php repeats itself

I'm need some help on my query. I'm building up a category page where on top a post need to show where custom field key 'uitleg' has value 'ja'. Per category there is only one post with that value. ...
1
vote
4answers
918 views

HTML / Javascript in custom field textarea?

Is there a filter for allowing HTML / Javascript into a custom field textarea? I'm using get_post_meta. On the frontpage I want the HTML / Javascript to run, not to be displayed.
1
vote
2answers
1k views

Orderby custom field meta value ASC and then by date DESC

I need to allow post ordering in certain categories. One of the sorting options is a custom field meta value. First problem is that not all posts have that meta assigned and i need to order these by ...
0
votes
1answer
2k views

query posts with custom field meta value

<?php query_posts( array( 'showposts' => -1, 'post_parent' => $post->ID, 'post_type' => 'page', 'orderby' => ...
0
votes
1answer
1k views

How to make custom comment fields required and message field not required

I have a comment form that has name, email, brief, detailed and rating fields. The name, email, brief and rating need to be required, but the latter two are custom fields and I can only make them ...
1
vote
2answers
104 views

Eliminating the appearance of a specific custom field in a post

I would like to suppress the output of one of my custom fields. Is there a way to do this using the <?php the_meta(); ?>command?
3
votes
4answers
837 views

How I check if the same post slug has not been used before publishing?

For an indie rock agenda I created event posts. With the help of javascript, the custom fields values (bands, places and date info picked in select boxes) are copied as the post title when publishing ...
1
vote
1answer
291 views

Custom field not updating when value is empty

I've added a few custom fields to the WordPress image uploader using the hooks attachment_fields_to_edit and attachment_fields_to_save. Everything works very well, except when a field is erased by the ...
0
votes
1answer
42 views

What is the best way to add an advanced / intermediate / beginner tag to a post

Suppose you have a WordPress blog that you are using to produce tutorials, and that you would like to split up your posts according to skill level (i.e. beginner, intermediate, advanced) depending on ...
0
votes
1answer
303 views

Custom posts type for individual pages?

I am trying to make a wordpress site with an idiot-proof backend CMS. I have built several relatively small wordpress sites, but now have moved on to a larger project and want to do it right. ...
2
votes
2answers
1k views

How to rename a custom field?

I have 3000 posts with that custom field name 'refer' and i need to change it to 'ref' for theme needs, instead of doing it manually i need a query or technique to change them all. Question 1 I am ...
0
votes
1answer
324 views

Display content between two dates?

I want to display a meta field between two dates, the admin can set the two dates via the custom fields. How can i make such content show between the dates set? Thanks Matt
0
votes
1answer
749 views

Searching with Multiple (Parallel) Criteria on Custom Fields?

I'm just an basic Wordpress user. I need to make search box with multiple criteria inputs (multiple conditions) to search inside various Custom Fields. For example including following Custom Fields: ...
1
vote
1answer
298 views

How can I hide admin columns showing extra custom taxonomy fields?

I'm adding extra custom taxonomy fields to a custom taxonomy called, let's say, "Beer Style" (or "beer-style", in the screenshot, for now), with extra custom fields like "Alcohol by Weight (Volume)," ...
1
vote
2answers
3k views

Using get_posts with arguments found in meta keys

I am using get posts, but I need to refine the query based on posts where a certain meta_key has a certain value. Something like this <?php $reviews = ...
0
votes
1answer
417 views

How to make custom fields respect paragraph breaks

In one part of my site I am displaying custom field data like this: <?php global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, 'info', true); ?> This works ok ...
1
vote
1answer
871 views

Add custom field to image editor

How do I add custom field to the image editor, such as under the image 'Description' field? To be much clearer, it's where the settings for the images are after you upload an image in the attachment ...
0
votes
2answers
147 views

Add New Post (Custom Post Type) Deletes 1 Post's Custom Meta Data

function save_details( $post_id ){ if ( wp_is_post_revision( $post_id ) ) $post_id = wp_is_post_revision( $post_id ); update_post_meta( $post_id, "testimonyname", $_POST["testimonyname"] ); } ...
0
votes
1answer
126 views

Taxonomy Extra Meta [duplicate]

Possible Duplicate: Adding Custom Field to Taxonomy Input :Panel I created a custom post type with a taxonomy associated. When I add new item for my taxonomy, I get name, slug and ...
1
vote
1answer
270 views

Custom fields 'for' custom taxonomy?? Can someone explain why?

I'm implementing various custom taxonomies for my project and I came across the concept of custom fields for custom taxonomies, which baffles me. I though custom fields where just custom fields ...
0
votes
1answer
167 views

Taxonomy or Custom Field

I'm creating a network that has profile pages for authors (custom post type) on the main site, where I've created a few non-hierarchical taxonomies to help users sort through the authors. These ...
0
votes
1answer
583 views

Can 'Custom Field' data be inserted into this Short Code?

I have created a custom page template. In the template, I use a shortcode for JJ NextGen JQuery Slider. I would like the page to have a 'custom field' called 'Image Gallery' with a value that derives ...
4
votes
1answer
354 views

update_user_meta: How many is too many?

I am working on a community portal that may in future cater to extremely large user base. All users have about 50 settings that needs to be stored to the user meta. These settings would be frequently ...
6
votes
1answer
15k views

WP_Query - Order results by meta value

I've checked around and haven't seen an answer which works as of yet. I have a WP_Query with the following arguements: $args = array( 'post_status' => 'publish', 'post_type' => ...
0
votes
1answer
335 views

Save custom field types with this function…?

I found this great article (right here) about creating and saving custom fields for user profiles. The problem is that it only saves text fields. I can't save checkboxes, radio, or any other field ...
2
votes
1answer
2k views

Add meta data to the menu

I encountered this problem what i thought to be one of the worlds simpliest things, I wanted to add a subtitle to the menu somethin alike this http://img4.imageshack.us/img4/7816/unled10b.png . Then i ...
0
votes
1answer
486 views

How to use custom fields to replace top-level parent title with an image using wp_list_pages?

I'd like to integrate get_post_meta into the wp_list_pages mix so that any top-level parent list items get replaced with images ONLY when a key exists in the post's custom fields section. I can't do ...
0
votes
3answers
132 views

First Custom Post Custom Fields Empty After New Custom Post

I am working on a theme which contains a custom post type with custom fields. Everything is working perfectly except the when a new custom post is added, the custom fields for the first custom post ...
4
votes
1answer
1k views

How to filter custom post type archive by meta value

I have a problem where I'm trying to build a calendar plugin for a client. I'm having trouble getting a date based archive for the custom post type I'm using. I'm not too well versed in how the ...
1
vote
1answer
2k views

Should custom meta boxes be able to output shortcodes the same as Wordpress' native post editor?

Simply put: Should custom meta boxes be able to output shortcodes the same way as Wordpress' native post editor? Reason I ask is because Ive created my own custom meta box for inputting a shortcode ...
3
votes
5answers
567 views

How to do a custom bookmarks post type?

Let me first explain what I am wanting to do... I am wanting to add all my hundreds of website bookmarks that I have now in my browser, into wordpress for the following reasons. Can search my ...
5
votes
4answers
4k views

Is there a way to set default custom fields when creating a post?

When I'm creating a new post, just after clicking "Add New", when the post editor shows, instead of having to use the dropdown and choose a custom field to use, I'd like to have some default custom ...
4
votes
4answers
6k views

Add custom taxonomy fields when creating a new taxonomy

I've been able to leverage this super tutorial by @Bainternet in order to add custom fields for taxonomies. I've tweaked the markup, and added a separate callback to add fields to the "Add New ...
0
votes
2answers
587 views

Display custom field only if it has a value

this is the correct solution <?php $meta_cat_name = get_post_meta( $post->ID, 'related blog articles', true ); if( !empty( $meta_cat_name ) ): $my_query = new WP_Query( array( 'category_name' ...
1
vote
1answer
167 views

Add field to all custom post types

I know how to add fields to custom post types one at a time. I was wondering if there is a way to add a field to the default post type as well as all the custom post types at once? Thanks
0
votes
2answers
3k views

Show posts from category specified using a custom field

I have a post that shows the titles and excerpts from a specific category underneath the content. Currently this is coded into a specific template like this: <?php ...
0
votes
2answers
436 views

Google map that plot's several markers - each one with custom data

I'm looking to create a custom Google map that plots several markers on it that then shows custom data in the popup when the marker is clicked. I've setup the pages in WP in this manner: Map (parent ...
0
votes
1answer
399 views

Only display custom field if it there is a value inside

Quite a simple question really, but unsure how to do it. I have this little bit of code: <li><span> <?php if ( function_exists('get_custom_field_value') ){ ...
6
votes
1answer
6k views

How set featured posts using checkbox in post edit screen?

I want to make selecting a featured post is just by checking a checkbox in edit screen AND be able to retrieve these featured articles from only specific category ? in short what I'm looking for : ...
0
votes
2answers
124 views

Replacing custom field with shortcode

I've been using custom fields for my wordpress theme, but i'd like to use shortcodes now for easier posting. so before, in my index.php i have this: <?php echo get_post_meta($post->ID, ...
0
votes
1answer
133 views

Problem with writting correctly a query posts args in Wordpress

In my posts custom fields, I have a meta_key named ending. The value of it is a date in the form of 30-11-2011 (dd-mm-yyyy). I tried this below but with no luck. ...
0
votes
2answers
3k views

BuddyPress - Hook to Update Custom Profile Fields [closed]

I am working on custom app for a client that requires some extra fields in the user's profile. I have successfully created a registration page that saves the custom fields and now I need to do the ...
0
votes
1answer
508 views

Create list from custom field comma separated values

I've created a custom field named 'Essential Info', which I plan to allow the admin to add a list of values to. E.g. No Pets On-site doctor Car Parking 100m from beach ...etc. However, I'm not ...
0
votes
1answer
638 views

Including inline Custom Fields info with add_filter in functions.php

I have a function set up to place some standard text in each post for a Custom Post Type. However, within that standard text I want to pull some unique text from a few custom fields. Not sure what is ...
2
votes
2answers
689 views

Display info from custom fields in all images' HTML

Okay, I've been working on this all day and can't find the solution anywhere. I've created a custom field within the image upload screen (info first found here). The field stores the name of a ...
0
votes
1answer
792 views

How to query posts by month based on date custom field?

I currently created a custom field for a custom post type that stores a date in the format dd/mm/yyyy is there a way to query the posts by the month? I "kind of" got the functionality I need using ...
0
votes
1answer
137 views

Add a field to just ONE page

I discovered the 'More Fields' plugin which allows an editor to control which fields appear on which types of items in WordPress. Problem is, I would like to control which pages appear on just ONE ...
0
votes
2answers
1k views

Sorting within nested queries / multiple meta keys

I have the following ALMOST working perfectly, but have run into a couple of issues. Right now this displays a Books archive page, ordered like this: Genre Name -- Series Name --- Books ...