Articles of custom field

Custom Post Type + 20k posts = blank/404 within Admin edit.php

This question already has an answer here: Custom post type – posts list – white screen of death 4 answers

Show custom field if it exists, and show different elements if it doesn't

Basicly what I’m trying to do (with very basic knowledge of PHP): If Custom Field $randomname exists for that particular post, show the content of that custom field. If Custom Field $randomname doesn’t exist for that particular post, show something else – for example: <div class=”name”>content</div> Any help is highly appreciated.

Assigning the same custom meta box to multiple post types

I currently have videos set up as a custom post type and I have also created a custom meta box for it that allows users to enter the ID of either a youtube/vimeo video – the video is then displayed on the front end. I want to re-use this meta box for another custom post […]

making sense of admin-ajax

So I’m working with ThemeTrust’s “reveal” theme, and there is an ajaxed in chunk-of-content that I’m really trying to change (grab custom meta fields (images) + insert into a slideshow). As far as I can tell the following piece of code grabs the content from the normal tinymce box and drops it in the #projectHolder […]

Filtering by Post Meta Custom Fields – Performance

I could use some advise on how to structure my data for performance. I have a custom post type with a lot of custom meta data stored in the wp_postmeta table as a serialized array under one meta key for each post. Now, I need to get some posts from that post type, and filter […]

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 by dropdown of existing posts? I am running into a problem however when wordpress auto saves itself, it clears […]

BuddyPress – Hook to Update Custom Profile Fields

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 same for the “Edit Profile” page. The function that I used to save the custom fields on registration […]

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 does this but found nothing. Code examples, plugins, hints. Anything might be helpful.

How to customize default wordpress editor?

Good to hear that Sonny (wordpress3.3) has the new editor API wp_editor() that gives us the ability to use multiple instances of the editor in our custom fields with ease. But I needed to customize the default editor (for the main content) and couldn’t figure out how to do it with this function. I needed […]

How to Validate Post Meta type/extension (Video File Image File etc)

I am trying to learn meta’s in WordPress by taking an example of the already existing meta → function cpmb_display_meta_box( $post ) { // Define the nonce for security purposes wp_nonce_field( plugin_basename( __FILE__ ), ‘cpmb-nonce-field’ ); // Start the HTML string so that all other strings can be concatenated $html = ”; // If the […]