WordPress.org

Ready to get started?Download WordPress

Forums

How to: Author profile meta as custom field (2 posts)

  1. Marc P Gangmei
    Member
    Posted 3 years ago #

    I like to automatically create custom field from the author profile meta

    Actually I am trying to use themeperpost for WP 3.1

    function add_custom_field_automatically($post_ID) {
    	global $wpdb;
    	if(!wp_is_post_revision($post_ID)) {
    $themename = get_the_author_meta('themeperauthor', $user->ID);
    		add_post_meta($post_ID, 'themeperauthor', $themename, true);
    	}
    }

    #Presently Custom field name is created but without the value.
    #available/show only for the default post type 'POST'

    I want it for a specific post type call weblogs

    If this is resolved an advance plugin themeperauthor will be born.

  2. Marc P Gangmei
    Member
    Posted 3 years ago #

    I got the answer here But got another question

Topic Closed

This topic has been closed to new replies.

About this Topic