Tagged Questions

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

learn more… | top users | synonyms (2)

5
votes
3answers
5k views

don't publish custom post type post if a meta data field isn't valid

I have a custom post type (CPT) called event. I have a meta box for the type with several fields. I would like to validate some fields before publishing an event. For example, if an event's date is ...
1
vote
3answers
19k views

Custom query with orderby meta_value of custom field

Aa you know, as of WP3.0 there are options for custom advanced queries, which is great. As of this, some query parameters of custom fields like meta_key, meta_value were deprecated for the new ...
2
votes
1answer
2k views

I am trying to create a simple frontend form for posting

i am trying to learn and create some deeper things with Wordpress. My goal is to create a code/script/plugin that will allow me to post from the frontend. I have seen many plugins, like templatic ...
0
votes
2answers
2k views

How to remove duplicate Custom Fields?

I have migrated my blog from blogspot to WordPress. Then I have noticed many of the posts contain duplicate custom fields. Like blogger_author, blogger_permalink, blogger_blog are duplicated upto 5 ...
3
votes
1answer
426 views

Utilize TinyMCE hyperlink chooser outside of TinyMCE

Is it possible to use the "Insert/edit link" dialog box outside of TinyMCE? For example, if I wanted to add that dialog box to a generic button within a plugin settings form, is it possible to ...
0
votes
1answer
1k views

How to automatically change a posts status to draft based on custom field

I would like to set a post to Draft automatically based on a custom field date. Note: I am using the plugin Magic Fields. Based on the following code I want to use a custom field 'expiration' to ...
0
votes
1answer
72 views

Counting post fields

Is there a way to count the amount of empty fields of a post (or the fields of a plugin as they relate to the different)? For example, I have 1,500 posts on my site. Each post has important fields ...
2
votes
4answers
2k views

Automatically Insert Custom Field on Custom Post Type Publish

I was searching for a way to automatically insert a custom field when publishing a custom post type. And I repeatedly found the same solution, from here: ...
1
vote
2answers
2k views

How can I remove fields in the attachment editor?

Is it possible to remove a default attachment field from the attachment editor, for example the "Caption" field ? To give you some context, I'm trying to build a custom attachment editor page. I ...
1
vote
1answer
1k views

How to make condition, based on custom fields value?

So what i would like to do is order in some CSS depending on the value of a custom field. The code below just says that if there is ANY value, do X, else do nothing... <?php ...
1
vote
3answers
633 views

Custom Field Template seriously messed up in WP 3.1.1

I'm having a serious problem with the plugin Custom Field Template in which applying a CFT based on the template name is not working (it's as if the Ajax used to load the template is breaking). I've ...
2
votes
1answer
1k views

custom field value date convert to unix timestamp problems

For some reason, I'm having difficulty converting a date value stored in a meta field to a unix timestamp (and back again). If I save the date as a string it all works fine, but if I convert it to a ...
0
votes
2answers
207 views

Passing meta_box string to post__in?

Hey Guys, I'm using a meta box to store a bunch of page ID's. When I try to pass the page ID's to the post__in parameter of WP_Query it doesn't work becuase the metabox comes throug as a string, when ...
3
votes
3answers
2k views

How do I order by multiple custom fields using wp_query?

I have a rating system where the user can enter a custom field of either "Stars" or "Hearts", but whichever one they choose they have to enter a value of 1 thru 5. Using wp_query, I can successfully ...
1
vote
2answers
803 views

Added 20 Custom Fields. Only 10 showing in drop down

Just like the title states. I've added around 20+ custom fields into my wordpress site and only around 10 are showing in the drop down. The custom fields are all functioning fine on the site side, ...
0
votes
1answer
516 views

Getting and calculating averge value of custom fields of the same tag

So basically i got this custom field value which is stored in $postrating - and under the database field customfield1. I want to grab the value of that field for all posts that have the tag currently ...
1
vote
1answer
1k views

How to select posts from multiple categories and metavalues?

I need to select posts who are in multiple categories and have certain post metavalue. I can select multiple categories with query_posts( array( 'category__and' => array(1,2,3) ) ); But also I ...
0
votes
3answers
875 views

Escaping Quotes

For some reason when i try to put like a embeded video my video has slashes inside the code, but if I add it in the template itself then the code is fine i was told its "escaping quotes" anyhow this ...
4
votes
1answer
3k views

Search multiple custom fields by using meta_query

I'm trying to create a search results listing for a custom post type and the problem I'm running in to is with the way the 'meta_query' parameter is stringing the passed values together. It appears ...
0
votes
1answer
886 views

Adding custom Field To The Posts Listing

Are there plugins or hooks to editing custom fields just from the posts listing in admin panel?
0
votes
2answers
910 views

Can data from a Custom Field data be used by a shortcode on a per page/post basis?

I'm developing a site where better is very quickly becoming the enemy of the good. I would like to make updating as simple for the client as possible by enabling them to populate boilerplate and ...
0
votes
1answer
2k views

Change Page Order by Custom Field (Magic Fields)

My code lists the child pages ordered by post title, pulling through the first image attachment of the child post as the thumbnail. The child pages contain custom fields created using the Magic ...
1
vote
1answer
291 views

Custom options below pages/posts editor?

I want to add permanently boxes below Visual/HTML editor for each page/post. I've never played with custom fields before, and I'm not sure is it way to go? If yes ten tell me, good people of ...
0
votes
3answers
1k views

How can I display only the post titles from a selected category in columns?

I'm working on a website where the client wants a static page displaying information about a certain category. Then under the static information she wants all the posts from that category in a 2 ...
0
votes
1answer
2k views

Pull custom fields from custom posts within a loop

This is going to sound a little nuts. I have a situation where I'm displaying a list of products that a user selects to move to the products' page. I also have documents and videos that I created ...
1
vote
1answer
1k views

Order query by meta_value with multiple custom fields

I would like to get ordered all my posts with multiple cutom fields (WordPress 3). Exemple, I've 2 custom couple meta_key/meta_value : " order_submenuexpositions / numeric " " ...
0
votes
1answer
254 views

Display agents (custom post type) alphabetically, except one who always shows last

I would like to display all agents a-z, except there is one agent who should always show up last. Ideally I'd like the ordering to be done from the value of a custom field, dName. I was looking ...
1
vote
1answer
547 views

Filter custom posts using auto populated dropdown selectors

I've created a custom post type named agent. I have a page that lists all agents. When I add an agent I have a whole series of custom meta boxes that can be filled out, region, specialty, ...
5
votes
1answer
2k views

Put the media uploader in a metabox

I find it very unnecessary to have an "add image" button that brings me to yet another screen that will let me upload content to my post. Ideally I would like to have a meta box with the option to ...
0
votes
1answer
3k views

custom field as a boolean with a checkbox?

I have installed the more fields plugin which gives me access to a custom field checkbox. When setting the field up through the plugin the caption says: Creates single checkbox, which key is either ...
1
vote
1answer
494 views

Display custom field values from posts on frontpage

How can I pull a custom field with meta_key "proprty_feature" (and has a value) for all posts and display them on my frontpage? Would like to display the post name as a link above the value..
0
votes
1answer
5k views

enabling custom fields in admin?

i've found out that there are custom fields but i'm not able to activate them in the admin panel .. :( i've checked the screen options but there's no custom fields - looks like it depends on the ...
4
votes
1answer
4k views

Automatically set post title to same value as a meta box

I've removed "Title" from a custom post type that I created. Which makes it that all new posts gets the name "Auto Draft". To get around this I want to be able to fetch a value/post name from a meta ...
0
votes
2answers
2k views

converting custom field date format

I am using the More Fields plugin which gives me the ability to create a date formatted YYYY/mm/dd and I want to convert that to be shown like: February 11, 2011 Is this possible?
-1
votes
2answers
552 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
829 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
140 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
3k 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
204 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
515 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
453 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
886 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
8k 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 ...
3
votes
1answer
689 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); ...