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

learn more… | top users | synonyms (2)

2
votes
3answers
1k views

Search everything (posts, pages, tags, cpt, meta)

I would like to know how to use the built in wordpress search to return results from all content on my site. Specifically, I want to search; posts pages tags custom post type (portfolio) custom ...
2
votes
1answer
858 views

wordpress plugin error handling

I am looking for a way to handle errors for a custom post type with its own custom fields. This is all part of a plugin I'm writing, however, after extensive research the only way I found is through ...
2
votes
1answer
1k views

Create Posts using Import>RSS/WXR/XML and pass values to Custom Fields

My problem is simple. I need to make a lot of posts containing image url's for a "photo gallery" page. I've read up a lot on creating posts from RSS feeds and imports. I've been successful at creating ...
2
votes
2answers
1k views

Displaying additional User Contact Information

I have been advised how to add additional contact info fields to the User admin area here (Click here). However, I am not entirely sure how I can display the the field contents in a link within my ...
2
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 ...
2
votes
1answer
1k 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 ...
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
944 views

How to filter a dd/mm/yyyy date from a custom field in a query

I'm trying to build a query in order to sort some posts by a date custom field, where the dates are formatted dd/mm/yyyy. It works by querying the database directly with get_results like in this ...
2
votes
1answer
453 views

Plugin similar to Taxonomy Drill-Down for custom fields?

Is there a plugin available that does for custom fields what Scribu's excellent Taxonomy Drill-Down (formerly called Query Multiple Taxonomies) does for taxonomies?
2
votes
2answers
873 views

How can I generate a RSS feed based on a custom WP_Query?

I have a WP_Query returning a list of posts of a particular post type and with a certain meta_value (custom field value) Is there a way generate an RSS feed based of these results ?
2
votes
1answer
584 views

How to hook get_terms() to only show count of posts that have custom meta

Here is what I have: A custom post type that has a custom meta value added to a post that stores the posts expiry date. When the post passes this expiry date it no longer shows on the site. This ...
2
votes
3answers
837 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 ...
2
votes
2answers
704 views

Best way to add custom / magic / flutter fields into RSS feed

Using Wordpress 3, creating write panels with Magic Fields, how do I add custom fields to my RSS feed? For example, I have an 'image of the day' write panel, with a custom field for the photo credit. ...
2
votes
1answer
31 views

Custom field when adding new site to multisite networked WordPress

I have a multisite setup in WordPress. Is there a way for me to implement a custom field when I create a new site in Admin > Sites > Add New. My current options are Site Address, Site Title, Admin ...
2
votes
1answer
257 views

Filter out posts before display category count

I have meta key "Due" for posts....if a post has expired (past the current date or not equal to it) then it should not be displayed in the count (i have code to display the count, which fades in over ...
2
votes
1answer
1k views

How to Display ACF Relationship Custom Field as Link to Specific Custom Post?

OK. I am reading this ACF tutorials, but I am not getting into this. I have 2 post types: Lists and Contacts. Every List must be related to some Contact, and I use Relationship custom field type ...
2
votes
1answer
89 views

all tincymce's switch when updating page after changing from html to text in custom metabox

I have a custom metabox which uses wp_editor and when i switch to text editor instead of visual the main content tinymce also changes to text view when i update. I was wondering am i doing something ...
2
votes
2answers
459 views

Using Custom Function With Advanced Custom Fields

I've written a custom function which works with the native WordPress custom fields function but I need it to work with the Advanced Custom Fields plugin. I have created the custom field and meta box ...
2
votes
1answer
112 views

little help with a mySQL query to wp database

@t31os gave a very helpful response to: getting all values for a custom field key (cross-post) by providing this function if ( ! function_exists( 'get_meta_values' ) ) { function get_meta_values( ...
2
votes
1answer
230 views

Frontend posting - everything saves other than checkboxes?

I have a form on the frontend of Wordpress which is saving all fields except a checkbox array. It displays and saves the correct values if I tick the boxes in the backend post editor, and the ticks ...
2
votes
1answer
98 views

Making a configurable field translatable

I'm working on a theme right now that gives the admin the possibility to set different texts that are used within the theme, by configuring them in the admin panel (e.g. the text that is displayed, ...
2
votes
1answer
755 views

Show Custom Comment Fields when editing in admin

I'm using the Custom Comment plugin to add custom fields to my comments. This plugin lets you define more fields for comment to let your visitors include their facebook, twitter and ... in their ...
2
votes
1answer
42 views

Can you ungroup Custom Fields?

I have been using a lot of Custom Fields to use Wordpress like a CMS, beyond simple posts and post meta. The admin area for adding new posts has little "widgetized" movable areas like the ...
2
votes
1answer
369 views

Calculate the sum of certain the_sub_fields

I am trying to calculate the sum total from two custom sub-fields using ACF. The custom field is called 'repeater' and the sub-field is called 'space_avail'. I've tried the code below but it just ...
2
votes
1answer
683 views

Wordpress Search documentation: how to improve search query using taxonomy terms, custom meta fields?

I'm trying to understand how Wordpress search works. I haven't found much info on the Codex. Arguably, search is not the best WP feature. Even Wordpress.org uses Google Search. I would like to make a ...
2
votes
1answer
1k views

Search ONLY by meta key / meta values

I'm almost there on this one. On functions.php i have this: function base_home_product_post_type( $query ) { if($query->is_search() && $_POST['box'] == 'sku') { ...
2
votes
2answers
264 views

Trying to perform complex custom field query with order by set to field value

I've got two custom fields for event posts: event-start and event-end. When I'm querying for current events, I'd like to show any post where the event-start OR the event-end is greater than or equal ...
2
votes
1answer
683 views

Use ajax to update_post_meta

2 days ago I asked this then I tried to work on my code to be able to understand how ajax and php work and now I have a new issue that, probably would be easily solved. These are my codes: <?php ...
2
votes
1answer
164 views

Sort by posts that have a featured image?

I'd like to sort posts on the index page to show those that have a featured image first. I've done this in functions.php: add_filter( 'pre_get_posts', 'my_get_posts' ); function ...
2
votes
1answer
1k views

HTML code in Custom field

I'm using a custom field to display images in a slider on each post, but when I update the post after having entered the HTML code in the custom field, the code disappears. I'm assuming that there is ...
2
votes
1answer
506 views

WP_Query display next custom post from today's date

I have a calendar plugin that uses custom posts types to create events. There are several custom fields that allow me to create various and seemingly unlimited post queries. The one I'm currently ...
2
votes
1answer
391 views

Plugin to auto convert custom fields to tag

I have 3 custom fields that i would like to have automatically converted to tags anytime the post has them. Custom field names: tag_name1, tag_name2, tag_name3 Is there a plugin or function that i ...
2
votes
1answer
163 views

My metabox class

I'm using the class My Metabox class *-- Custom Post Init Begin --*/ function mypost_types(){ register_post_type('video', array( $labels = array( 'name' => __( ...
2
votes
1answer
46 views

Leader board for game on homepage

I've built a simple game which is housed on my homepage. I'd like to create a leader board (a small results table) which displays the top three 3 scores. How would i insert/retrieve the score data ...
2
votes
1answer
124 views

Can ordering post list by meta_value cause performance issue?

For some code refinement and to add new features to my plugin, I want to display posts ordered by specific meta column value like this; query_posts($query_string . ...
2
votes
2answers
332 views

Plugin allowing for artists, events and venues

I'm working on a music festival website and up until now have used WordTour. I really like WordTour's artists > events > venues content hierarchy, but am having difficulties transitioning from last ...
2
votes
2answers
296 views

Autoremove empty custom fields

The code you see below only works sometimes. I'm no pro on PHP so can anyone help me improve this code? I use it in my functions-php file in my wordpress mu setup. The biggest problem is that it wont ...
2
votes
1answer
400 views

Order by value in serialized custom field

Quite a pesky problem here. I've taken over a site that contains multiple information, serialised, within a custom field. For example: if ($new_query->have_posts()) : while ...
2
votes
2answers
373 views

Custom image sizes for custom field media uploads

Is it possible to resize my image uploads to different settings, depending on what custom field I'm on? I'm using wpalchemy, and have an image uploader for a heap of different custom fields. It would ...
2
votes
2answers
663 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 ...
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 ...
2
votes
1answer
888 views

wp_handle_upload error “Specified file failed upload test” but still creates attachment?

Having a bit of trouble with an image upload custom meta box. What happens is the uploaded image is created as an attachment but the wp_handle_upload seems to kick back the error "Specified file ...
2
votes
2answers
376 views

Wordpress Action Hooks and Post ID?

I'm creating a very basic Wordpress plugin whose purpose is to display a numerical value beside each post. My Logic for the plugin function (plugin.php) is this: <?php function foo($post_id){ ...
2
votes
2answers
246 views

Populate Custom Field Dropdown on Theme Install?

Is there a way to populate the custom field dropdown box when you install a theme? I want to make it easier for users and avoid having them add the terms manually when they first set it up.
2
votes
2answers
9k views

Including custom fields in search?

I use custom fields for lots of my content on both Posts and Pages, so that half of the text will be in the main post body and the other half in a custom field. Unfortunately, when doing this only ...
2
votes
1answer
620 views

get_post_meta in sitewide tags plugin fails to return value for custom fields

Here's another conundrum that I'm toying with. There's a routine within the sitewide tags pages plugin which takes a list of custom fields (entered in the admin settings) and then uses these as keys ...
2
votes
4answers
3k views

Wordpress Custom Fields by category

let's say I have 100 categories and each has 10 custom fields for it self,for example : category Computer : Cpu - Hard - Ram - ... category TV : resolution - inch - usb support - ... ... now I want ...
2
votes
2answers
340 views

Job board with custom fields (free or paid)

I'm looking for a theme or plugin (free or paid) for WordPress to create a job board site. I've read this question: Creating a job board using WordPress (for free)? But I need two (or three) ...
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 ...