Flipboard provides a digital web and mobile-distribution platform for original content from publishers around the world. It can help you distribute to and connect with people who are passionate about your content. As a blogger or news outlet the biggest hurdle is how you can get traffic for your site, Flipboard can help you grow traffic to your website and to do that you will need to become publisher on the platform. Often, your submission will be rejected, for failing to meet the Flipboard RSS guidelines.
If you are using WordPress, this would be definitely because, your images are not included in the enclosure node for each item in the feed. According to Flipboard you must use the tag to add a media element that will be used in layout view to illustrate your article. It can be an image or a video. For videos, mobile-friendly mp4 format is strongly preferred. For images, prefer a high-resolution image; the smallest dimension should not be under 500px. You can follow the steps below, to remedy the issue with enclosure node.
- Navigate to WP Admin > Appearance > Theme File Editor.
- Select functions.php.
- Insert the following code at the last line in the functions.php.
function rss_post_thumbnail($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = '
' . get_the_post_thumbnail($post->ID) .
'
' . get_the_content();
}
return $content;
}
add_filter('the_excerpt_rss', 'rss_post_thumbnail');
add_filter('the_content_feed', 'rss_post_thumbnail');
Alternatively, you can use the code below which is more “aggressive”.
function feedFilter($query) {
if ($query->is_feed) {
add_filter('rss2_item', 'feedContentFilter');
}
return $query;
}
add_filter('pre_get_posts','feedFilter');
/* BEGIN SNIPPET
----------------------------------------- */
/**
* Get Remote File Size
*
* @param string $url as remote file URL
* @return int as file size in byte
*/
function remote_file_size($url) {
# Get all header information
$data = get_headers($url, true);
# Look up validity
if (isset($data['Content-Length']))
# Return file size
return (int) $data['Content-Length'];
}
/* END SNIPPET
----------------------------------------- */
function feedContentFilter($item) {
global $post;
$args = array(
'order' => 'ASC',
'post_type' => 'attachment',
'post_parent' => $post->ID,
'post_mime_type' => 'image',
'post_status' => null,
'numberposts' => 1,
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
$image = wp_get_attachment_image_src($attachment->ID, 'full');
$mime = get_post_mime_type($attachment->ID);
}
}
if ($image) {
echo '';
}
return $item;
}
Hocam Flipboard’ın yeni yörengelerine uyumlumu? Lütfen bilgi verirmisiniz? Uyumlu değil ise, konuyu ve kodları güncelleyip bana bilgi verir misin?
Flipboard yönergeleri, WordPress RSS’sini etkileyecek şekilde değişmedi. Yukarıdaki kılavuz hala mükemmel çalışıyor.
Flipboard, RSS’nizi neden reddettiklerine dair size ayrıntılı bir neden verecektir.
Hello, should we add both codes? or just one of them
Or should we add both codes into the themes function php file?
thx.
No, just add one.