• Resolved megamurmulis

    (@megamurmulis)


    #FILE: dms3-export.php

    1. remove/comment out that debug line after XML header:
    echo 'post_ids';

    2. When not using full export – currently only post attachments are exported. But featured images aren’t always post attachments..
    SOLUTION:

    function demomentsomtres_add_attachments($post_ids) {
    	$attachments = array();
    	foreach ($post_ids as $post_id):
    
    +		//****************************
    +		//post isnt always parent for a featured image
    +		$value = get_post_meta($post_id, '_thumbnail_id', true);
    +		if ($value) {
    +			$attachments = array_merge($attachments, array($value));
    +		}
    +		//****************************
    
    		$attachArgs = array(

    https://wordpress.org/plugins/demomentsomtres-wp-export/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Not exporting featured images that aren't posts attachments’ is closed to new replies.