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

learn more… | top users | synonyms (2)

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
548 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 ...
4
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
5k 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
560 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
164 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
431 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
380 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') ){ ...
5
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
122 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
132 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
486 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
618 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
662 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
744 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
128 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 ...
0
votes
3answers
486 views

Trying to save custom post type from frontend partially working

I've created the following custom post type (lugares means places) with a custom taxonomy of tacos and it works fine form the backend: /** * Custom post-type lugares **/ add_action('init', ...
3
votes
1answer
221 views

Is there a way to do multiple ordering on a multiple meta_query?

I'm experimenting with searches and multiple criterias and ordering. Let's say we have a real estate site, all posts have 2 custom fields (price and surface), and we want the visitor to be able to ...
0
votes
2answers
765 views

How to Resize the Custom Post Images?

am Having Custom Field named as thumb.i want to show the images using these custom fields.i want to be fix the image size. My code is <img class="thumb" src="<?php echo ...
3
votes
1answer
2k views

Querying custom post type with 2 custom fields (date-range)

I've searched WP Codex and StackExchange and gotten some clues, but I can't get this query working. I have 2 custom fields associated with each exhibition in Y-m-d format: exstart-date being the start ...
0
votes
1answer
310 views

WPAlchemy issue when using 2 select menus with the same values inside a repeating group

I'm using v1.4.14 of the WPAlchemy MetaBox PHP Class. I have 2 select menus within a repeating group, available_from and available_to. If I select Monday in the first select menu, Wednesday in the ...
0
votes
2answers
941 views

get_post_custom_values problem, please help

i want get the "issue-cover" from archive page list, i done it. but it will cant get the meta value when i update/add new a post to the archice page. <div class="monthly_archive"> <?php ...
1
vote
1answer
211 views

get_posts that haven't been assigned a specific custom field

I'm trying to use get_posts() to pull articles that have not been assigned a specific custom field. For example (not working): $articles = get_posts(array( 'post_parent' => 0, 'post_type' ...
0
votes
2answers
1k views

Order by custom date field

This one has been bugging me for a while. I've used Verve Meta Boxes plugin to add a date field to a custom post type I created, and I would like to somehow order by this field when using query_posts ...
1
vote
3answers
1k views

Custom fields gone (not screen option issue) [closed]

I don't know how but the custom fields box disappeared completely from the New Post Admin page and the screen options as well. What could cause this ?
0
votes
1answer
236 views

What's the best way to implement custom widgets on a per post basis?

I'm creating a category called "Falculty" where each post is a member of my client's staff. Each post includes a biography and photo gallery of that staff member. My client would like to be able to ...
5
votes
3answers
3k views

Sortable Custom Columns in User Panel (users.php)?

I'm using Register Plus Redux plugin to augment a registration form with custom metadata fields. These fields display at the bottom of each user record detail page and they can be retrieved with ...
1
vote
1answer
909 views

How to update serialized data in the user meta data

In my wp_usermeta table I have a field called "wp_s2member_custom_fields" In it is stored this value: a:2:{s:6:"alumni";s:3:"Yes";s:19:"donations_collected";s:2:"10";} I am trying to use: ...
0
votes
1answer
89 views

querying a custom field

I'm trying to hack a plugin to show the contents of a custom field where its currently showing the title. how would I get this to show a custom field called restaurants instead? Thanks, ...
-1
votes
2answers
547 views

How to mark a image attachment as background image?

I am trying to add a functionality to mark a post's attachment id as a background image. Basically, I would like to replicate the post thumbnail functionality: in the image attachment details, the ...
1
vote
2answers
832 views

Can't get metabox value (a url) returned using WPAlchemy

I'm using the WP Alchemy class to add custom metaboxes to templates in the admin panel and pull results from those metaboxes into the theme front-end. Here is the relevant code in content-link.php (in ...
0
votes
2answers
1k views

Post rating using Custom Field

I'm writing new theme for my blog. And I want to make some kind of post rating using custom fields. There are two fields: 'good-post' and 'bad-post'. And after each post I placed two buttons. Yep, ...
2
votes
2answers
3k views

Show Custom Fields in Quick Edit

I have several custom fields that I need my client to be able to edit at anytime. For the sake of convenience, I'd like them to be able to edit these custom fields from the Quick Edit. This way they ...
0
votes
1answer
76 views

Inserting custom fields into new-post.php without using the Custom Fields Template plugin?

I know there are a few plugins (Custom Fields Template seems to be the most popular one) that lets me insert custom fields into the new-post.php template. But I'm wondering if I can add in a few ...
0
votes
1answer
48 views

Using an “IF” statement based on the existence of custom field

I wish to use a function which is run only when a specific custom field is available. Something like: if (custom_field_x_exists("name_of_the_custom_field")) : <Do some ...
1
vote
2answers
3k views

Get custom field values into the sidebar/widget?

I haven't seen this done, but I want to return the custom field values outside of the loop in the sidebar.
1
vote
2answers
450 views

Conditional custom field query

I'm working on a job board-type site, and the client want to sell featured posts. They want the featured posts to expire from showing up in the "featured" section after a predetermined period of time, ...
1
vote
1answer
2k views

Is it possible to store arrays in a custom field?

If I understand correctly, custom fields work like this: key(string/int) => value(string/int) Is it possible to define a custom field like this? key(string/int) => value(array (string/int, ...
0
votes
1answer
616 views

Can serialized arrays in DB be matched against serialized arrays with meta_query?

Say I have an array of checkbox choices associated with a post (a custom field) stored in the database in serialized form. On my site, I present users with the same checkboxes and let them make their ...
0
votes
1answer
281 views

If post custom meta data is not set, show normal state

I'm much of a php-noob but have this idea of a loop for my site. I have the idea behind it but maybe you have an idea how to put this into code: $customfield = get_specific_customfield if ...
0
votes
1answer
838 views

make a dropdown custom field with 'cities' list in it

I am developing a website for real estates. I was wondering that how can I add a dropdown to my custom forms (theme my login plugin) for cities states etc. The basic point is that I dont want to add ...
0
votes
1answer
696 views

Creating an If/Else statement using WPAlchemy MetaBox radio boxs

I am using the WPAlchemy MetaBox Class to create additional metaboxs on my site. One has a section with a group of radio boxes. I've coded it as follows: <?php $mb->the_field('docposs'); ...
0
votes
1answer
299 views

Can I access a post meta field before the loop?

If I call the following function (on a page template, e.g. page-home.php) before the loop, nothing is returned. If I call it during or after the loop, the expected values are returned. Is there a way ...
2
votes
1answer
1k views

Metabox image upload and custom field

Is it possible to a) upload image in meta box (not using default WP image uploader) and then b) get the path to uploaded this way image in a custom field?
2
votes
1answer
173 views

Related links - from other sites

I'm in middle of re-building a website that's coded in a rather terrible custom CMS. Since the site is essentially a blog, I've been doing it in Wordpress. One thing I'd like to do is be able to add ...
2
votes
1answer
492 views

Search Custom Post Type Custom Fields

There are tutorials that explain how to limit a search to a specific category. My question is, is there a way to configure wordpress' search to, within a custom post type, search for a custom field ...
1
vote
2answers
1k views

Insert attachment ID in custom field from media uploader

This is what I want to do: In the media uploader, add a link "Use this attachment ID as custom field". Add the attachment ID in a custom fields meta box. I've searched for hours for a plugin that ...