Horje
Feedburner RSS not showing images from posts - Wordpress Solution
[Solved] - Feedburner RSS not showing images from posts - Wordpress Solution
Try following codes
Feedburner RSS not showing images from posts Website: http://windows7design.com/ I add there images using custom field: preview images are: post-img Then: http://feeds.feedburner.com/Windows7Design is not showing that images put the following code in your functions.php file in your theme folder:
function insert_img($content) {
	$img = '<img src="'.get_post_meta(get_the_ID(), 'post-img', $single = true).'" alt="'.get_the_title().'" /><br />';
    $content = $img.$content;
    return $content;
}
add_filter('the_excerpt_rss', 'insert_img');
add_filter('the_content_rss', 'insert_img');
that sholud work erez213 please post full functions.php file for me

<?php
/**
 * @package WordPress
 * @subpackage Windows7Styles_theme
 */

automatic_feed_links();

if ( function_exists('register_sidebar') ) {
	register_sidebar(array(
                'name'=>'Left',
		'before_widget' => '',
		'after_widget' => '',
		'before_title' => '',
		'after_title' => '',
	));

        register_sidebar(array(
                'name'=>'Right',
		'before_widget' => '',
		'after_widget' => '',
		'before_title' => '',
		'after_title' => '',
	));
}
?>

i will then swap it and check if that works
http://feeds.feedburner.com/Windows7Design not ideal but something is going on this is the problem: url to image: http://feeds.feedburner.com/img/Leopard_Dark_for_Windows_7_by_sagorpirbd.jpg and it should be: http://windows7design.com/img/Leopard_Dark_for_Windows_7_by_sagorpirbd.jpg
<?php
/**
 * @package WordPress
 * @subpackage Classic_Theme
 */

automatic_feed_links();

if ( function_exists('register_sidebar') )
	register_sidebar(array(
		'before_widget' => '<li id="%1$s" class="widget %2$s">',
		'after_widget' => '</li>',
		'before_title' => '',
		'after_title' => '',
	));
function insert_img($content) {
	$img = '<img src="'.get_post_meta(get_the_ID(), 'post-img', $single = true).'" alt="'.get_the_title().'" /><br />';
    $content = $img.$content;
    return $content;
}
add_filter('the_excerpt_rss', 'insert_img');
add_filter('the_content_rss', 'insert_img');
?>
That should work(fix the image url). Enjoy My bad,this is the right code:
<?php
/**
 * @package WordPress
 * @subpackage Windows7Styles_theme
 */
automatic_feed_links();
if ( function_exists('register_sidebar') ) {
	register_sidebar(array(
                'name'=>'Left',
		'before_widget' => '',
		'after_widget' => '',
		'before_title' => '',
		'after_title' => '',
	));

        register_sidebar(array(
                'name'=>'Right',
		'before_widget' => '',
		'after_widget' => '',
		'before_title' => '',
		'after_title' => '',
	));

}

function insert_img($content) {
	$img = '<img src="'.get_option('siteurl').'/'.get_post_meta(get_the_ID(), 'post-img', $single = true).'" alt="'.get_the_title().'" /><br />';
    $content = $img.$content;
    return $content;
}

add_filter('the_excerpt_rss', 'insert_img');
add_filter('the_content_rss', 'insert_img');

?>
i am here, just upload the newest version of your code, waiting for RSS update to see if this work, keep my fingers crossed http://feeds.feedburner.com/Windows7Design sorry but the problem is still there: http://feeds.feedburner.com/Windows7Design That should work for sure:
<?php
/**
 * @package WordPress
 * @subpackage Windows7Styles_theme
 */
automatic_feed_links();
if ( function_exists('register_sidebar') ) {
	register_sidebar(array(
                'name'=>'Left',
		'before_widget' => '',
		'after_widget' => '',
		'before_title' => '',
		'after_title' => '',
	));
        register_sidebar(array(
                'name'=>'Right',
		'before_widget' => '',
		'after_widget' => '',
		'before_title' => '',
		'after_title' => '',
	));
}
function insert_img($content) {
	$img = '<img src="'.get_bloginfo('template_url').'/'.get_post_meta(get_the_ID(), 'post-img', $single = true).'" alt="'.get_the_title().'" /><br />';
    $content = $img.$content;
    return $content;
}
add_filter('the_excerpt_rss', 'insert_img');
add_filter('the_content_rss', 'insert_img');
?>
i see that my solution had worked , enjoy :) like Christian said i post static src to template img folder but now i switch that to your code anyway i want to tnx you for helping and give this small award to you, i just asked Christian if he is ok with that, because he also helped me alot tnx for putting this to work !!! one more question, so i don't need to use plugin: Custom Fields for Feeds & Get Custom Field Values , only your code yes no,only my code i am going to kill myself really i've changed from summary to full RSS and images gone away: http://feeds.feedburner.com/Windows7Design what i've done more is delete those 2 plugins... what more i don't know, i've lost image, don't know really what happaned if you switch to sumarry,the images will back? and if it still dont work,try to install those plugins again when i put it to summary images come back ! everything would be good with only summary: http://feeds.feedburner.com/Windows7Design but the test , post is not formatted at all it is only formatted when i use full post
<?php

/**

 * @package WordPress

 * @subpackage Windows7Styles_theme

 */

automatic_feed_links();

if ( function_exists('register_sidebar') ) {

	register_sidebar(array(

                'name'=>'Left',

		'before_widget' => '',

		'after_widget' => '',

		'before_title' => '',

		'after_title' => '',

	));

        register_sidebar(array(

                'name'=>'Right',

		'before_widget' => '',

		'after_widget' => '',

		'before_title' => '',

		'after_title' => '',

	));

}

function insert_img($content) {
	if(is_feed()){
		$img = '<img src="'.get_bloginfo('template_url').'/'.get_post_meta(get_the_ID(), 'post-img', $single = true).'" alt="'.get_the_title().'" /><br />';
		$content = $img.$content;
	}
    return $content;
}
add_filter('the_excerpt_rss', 'insert_img');
add_filter('the_content', 'insert_img');
?>
try this with full content it is working great ! tnx
The reason your images are not appearing in the RSS feed is because they are in a custom field and not a core part of the post, so your RSS feed doesn't know about them. You can work around this with a plugin called [[LINK href="http://justintadlock.com/archives/2008/01/27/custom-fields-for-feeds-wordpress-plugin"]] Custom Fields For Feeds[[/LINK]] If you need more assistance on how to use this plugin other than what's on that site, there's also a blog post here that explains how to use it for images: [[LINK href="http://dodesign.us/blog/custom-field-images-in-wordpress-feeds/"]]Custom Field Images in WordPress Feeds[[/LINK]] I hope that helps :) Well i saw that plugin on google and tried to make it work but my main question was for whole answer, i mean to find a solution (working) for my site. if you need i can provide you proper access to my server I tried the solution from your link, but still nothing on my RSS. I've changed: $image = get_post_meta($post->ID, 'POST_IMAGE_URL', $single = true); to: $image = get_post_meta($post->ID, 'post-img', $single = true); upload that: http://coffee2code.com/wp-plugins/get-custom-field-values/ but still no images in my RSS Quick solution... try this: Use your "meta" image as you did it before but, put it inside the posting as a core part too like that:

<img href="IMAGEURL" class="myrssimg" />
Now add the following line to the css file of your theme

.myrssimg
{
display: none;
}
Now if someone is having a look at the rss feed the image is shown, but if someone does look at the actual homepage the image is hidden... No good, i will need to edit all posts ! to apply this one.. Normaly rss feeds are mainly used for future posts ... so... but i'll have a lok for another solution if I'm at home cool, tnx what is strange .. that author of this theme (coder) put the same stuff with custom field images on other site and there RSS is ok Add this to your functions.php

function cf_addtorss($content) {
global $wp_query;
$postid = $wp_query->post->ID;
$post_image_url = get_post_meta($postid, 'POST_IMAGE_URL', true);
if(is_feed()) {
if($post_image_url !== '') {
$content = "<p><img src='".$post_image_url."' /></p>".$content;
}
else {
$content = $content;
}
}
return $content;
}
add_filter('the_excerpt_rss', 'cf_addtorss');
add_filter('the_content', 'cf_addtorss');
This works for me i've added your code to functions.php rss is there , but without images ! the best code was erez213 , but there was problem with: this is the problem: url to image: http://feeds.feedburner.com/img/Leopard_Dark_for_Windows_7_by_sagorpirbd.jpg and it should be: http://windows7design.com/img/Leopard_Dark_for_Windows_7_by_sagorpirbd.jpg What is the meta key of the images?
post-img
or
POST_IMAGE_URL
? And, is the solution erez213 added still active? post-img is custom field for preview images but i change yours:


function cf_addtorss($content) {

global $wp_query;

$postid = $wp_query->post->ID;

$post_image_url = get_post_meta($postid, 'post-img', true);

if(is_feed()) {

if($post_image_url !== '') {

$content = "<p><img src='".$post_image_url."' /></p>".$content;

}

else {

$content = $content;

}

}

return $content;

}

add_filter('the_excerpt_rss', 'cf_addtorss');

add_filter('the_content', 'cf_addtorss');


i don't know WTF is going on, it was working this morning with wrong URL to image, but it was working, now i cannot see images with wrong URL, the code is the same .. don't know how the hell put this to work Are you using full posts or excerpts for the rss feed? ok it is working one more time: http://feeds.feedburner.com/Windows7Design i use full post to put this to work i change some option in http://feedburner.google.com/ setup i think not the option is important, but only that i've change something there it start working with @erez213 code, now the only thing that is wrong is: url to image: http://feeds.feedburner.com/img/Leopard_Dark_for_Windows_7_by_sagorpirbd.jpg and it should be: http://windows7design.com/img/Leopard_Dark_for_Windows_7_by_sagorpirbd.jpg

Solution - 1

put the following code in your functions.php file in your theme folder:

function insert_img($content) {
	$img = '<img src="'.get_post_meta(get_the_ID(), 'post-img', $single = true).'" alt="'.get_the_title().'" /><br />';
    $content = $img.$content;
    return $content;
}
add_filter('the_excerpt_rss', 'insert_img');
add_filter('the_content_rss', 'insert_img');
that sholud work


Solution - 2

The reason your images are not appearing in the RSS feed is because they are in a custom field and not a core part of the post, so your RSS feed doesn't know about them. You can work around this with a plugin called [[LINK href="http://justintadlock.com/archives/2008/01/27/custom-fields-for-feeds-wordpress-plugin"]] Custom Fields For Feeds[[/LINK]] If you need more assistance on how to use this plugin other than what's on that site, there's also a blog post here that explains how to use it for images: [[LINK href="http://dodesign.us/blog/custom-field-images-in-wordpress-feeds/"]]Custom Field Images in WordPress Feeds[[/LINK]] I hope that helps :)


Solution - 3

Quick solution... try this: Use your "meta" image as you did it before but, put it inside the posting as a core part too like that:


<img href="IMAGEURL" class="myrssimg" />
Now add the following line to the css file of your theme

.myrssimg
{
display: none;
}
Now if someone is having a look at the rss feed the image is shown, but if someone does look at the actual homepage the image is hidden...

Date: 2022-10-21 05:23:23
Category: Wordpress
More for You