WordPress 3.0 Custom Post Type Custom Fields
I have been trying out the custom post types for WordPress 3.0 Beta 2, I ran into a problem where i could not call the custom fields for posts i have assigned custom post type values.
I came up with this workaround for now until it is sorted.
function get_post_meta_custom($key, $single = false) {
global $wpdb,$post;
$answer = $wpdb->get_var($wpdb->prepare("SELECT meta_value FROM $wpdb->postmeta WHERE post_id = ".$post->ID." AND meta_key = '".$key."'"));
return $answer;
}
Call it using the following. I use this inside on the single post inside the loop.
if ( get_post_meta_custom('client_name', true) ) {echo get_post_meta_portfolio('client_name', true); }
WordPress Activation Key
This is how WordPress uses the new user ID and an MD5 hash to generate the activation key
$newuser_key = substr( md5( $user_id ), 0, 5 );
WordPress/BuddyPress – Meta title tag not working
If your buddypress child theme or customized parent theme does not work properly, in otherwords does you title tag output “[Blogname] – Blog” then use the code below to remedy the error.
Whats happening is if you use bp_title_tag() is will output the default string as seen above. If you lean towards using the WordPress conditional tags to test the pages, WordPress will see the BuddyPress pages as normal static pages.
Using bp_get_title_tag we can test to see if its a WordPress page or a BuddyPress page and use the appropriate title tag.
<title><?php
if ( is_home() ) { bloginfo('name'); echo ' | '; bloginfo('description'); }
elseif ( is_search() ) { bloginfo('name'); echo ' | '; _e('Search Results'); }
elseif ( is_author() ) { bloginfo('name'); echo ' | '; _e('Author Archives'); }
elseif ( is_single() ) { bloginfo('name'); echo ' | '; wp_title(''); }
// Entering the buddypress tags
elseif ( is_page() ) {
$page_title = rtrim(ltrim(bp_get_page_title()));
if ( $page_title == "[INSETRT YOUR WP_TITLE HERE] — Blog" ) { bloginfo('name'); echo ' | '; wp_title('');}
else{ bp_page_title(); }
}
elseif ( is_category() ) { bloginfo('name'); echo ' | '; _e('Archive'); echo ' | '; single_cat_title(); }
elseif ( is_month() ) { bloginfo('name'); echo ' | '; _e('Archive'); echo ' | '; the_time('F'); }
elseif (function_exists('is_tag')) { if ( is_tag() ) { bloginfo('name'); echo ' | '; _e('Tag Archive'); echo ' | '; single_tag_title("", true); } }
else { } ?></title>
Running quick tags outside of the loop
For anyone who has had the same frustration I have where you need tocall a function from a plugin, but they only have a quick tag you insert into the post/page.
Solution
<?php echo apply_filters(“the_content”,”[Insert Your Quick Tag Here]“); ?>
This will apply the filter that is usually applied when a post is queried, and display the quick tag as it would normall if you inserted via the backend.

