WordPress.org

Ready to get started?Download WordPress

Forums

Export to Excel
Export Custon Fields (5 posts)

  1. DirtyPete
    Member
    Posted 2 years ago #

    Hi guys,
    great plugin. I'm wondering if you could add the functionality to also export custom fields as their own columns. My site has a "place" post type, with custom fields for phone, email, address, etc. I'd like to be able to export a spreadsheet of custom post type that includes columns for each custom field. http://www.westernslopesvt.org/place/valley-stage/

    Thanks!

    http://wordpress.org/extend/plugins/export-2-excel/

  2. Kapil Chugh
    Member
    Plugin Author

    Posted 2 years ago #

    Thx a lot for your suggestion.

    Sure, we'll integrate it ASAP.

  3. Christiann
    Member
    Posted 1 year ago #

    I just added custom fields to mine like this:

    In includes/loop.php, I changed the part from lines 38-48 (starting $str.=' ...) to this:

    $str.= '
              <tr>
                <td>' . mb_convert_encoding(get_the_title(), 'HTML-ENTITIES', 'UTF-8') . '</td>
                <td>' . mb_convert_encoding($post->post_content, 'HTML-ENTITIES', 'UTF-8') . '</td>
                <td>' . get_permalink() .'</td>
                <td>' . get_the_date('Y-m-d', '', '', FALSE) .'</td>
                <td>' . get_the_author() .'</td>
                <td>' . $all_cats . '</td>
                <td>' . $all_tags . '</td>';
    
    // post meta add
    $custom_field_keys = get_post_custom_keys(get_the_ID());
    foreach ( $custom_field_keys as $key => $value ) {
    	$valuet = trim($value);
    	if ( '_' == $valuet{0} )
        continue;
        $str .= '<td>'.mb_convert_encoding(get_post_meta($post->ID,$value,true),'HTML-ENTITIES', 'UTF-8').'</td>';
    }	
    
            $str .='
              	</tr>';

    Seems to work. Thanks for the plugin!

  4. stl99
    Member
    Posted 1 year ago #

    Hi there,

    Any plans to add custom field support anytime soon?

    Cheers,
    Thomas

  5. Kapil Chugh
    Member
    Plugin Author

    Posted 1 year ago #

    Not sure right now :(

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.