• Hello,

    Big thank you for your plugin it save me. I would like to import the tags of the videos, Is it possible ?

    I found a code who use this :

    
     global $wp_query, $totalPosted, $limit;
    		$item = current($data['items'])['snippet'];
    		if($totalPosted < $this->limit)
    		{
    			$post = array(
    			  'post_content'   => '<iframe class="yt-iframe" width="560" height="315" src="https://www.youtube.com/embed/'.current($data['items'])['id'].'" frameborder="0" allowfullscreen></iframe>',
    			  'post_title'     => $item['title'],
    			  'post_status'    => 'publish',
    			  'post_type'      => 'post',
            'post_format'    => 'video',
    			  'post_author'    => get_current_user_id(),
    			  'post_category'  => array($this->category),
    	 ---------------> 'tags_input'     => @implode(",", $item['tags']),
    			);
    			
    
    -----------------------> query_posts('meta_key=yap_id&meta_value=' . current($data['items'])['id']);
    			if(!$wp_query->found_posts)
    			{
    				wp_reset_query();
    				$id = wp_insert_post($post, $wp_error);
    				//$this->Generate_Featured_Image($id, $item);
    
    				add_post_meta($id, 'yap_id', current($data['items'])['id'], true);
    				echo "Posted => ".$item['title']."<br />";
    				$totalPosted++;</blockquote>
    
    			}
    		} 

    Thank you

    • This topic was modified 7 years, 9 months ago by aidon00.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Add meta tag’ is closed to new replies.