derekfreeze
Member
Posted 4 months ago #
I'm not sure if what I am trying to do is possible, but it is worth a shot. I want to be able to embed things into my post and the 'extras' to be shown exclusively in my RSS feed. If you need any more details I can provide. I don't know much about WordPress, but I do know that the sky is the limit with this amazing software.
Thanks in advance and God bless!
Derek Freeze
Chief Web Designer
http://www.dailyrevolution.tv
Answer is yes.
Here is an article, not exactly what you are after I think but will start you on the right path
http://www.wpbeginner.com/wp-tutorials/how-to-add-content-and-completely-manipulate-your-wordpress-rss-feeds/
If you mean sections of content within the post itself, I would approach it by creating or finding a short code that you wrap around the editor text that only displays in feeds. Along this line:
Here is a sentence everyone can read. [rss]Here is a sentence only seen by feed readers.[/rss] Here is another sentence everyone can read.
That code is NOT GOING TO WORK AS IS. You have to find or create a shortcode.
derekfreeze
Member
Posted 4 months ago #
I need to know how to add the code so i can use [rss] [/rss]. Can you help me write that?
I just quickly adapted this from a "show content to logged in users only" shortcode I found while Googling. In other words, its not tested. I think it will work however. Put this in your theme's functions.php file
Then you should be able to use [rss]feed only content here[/rss] in your posts and pages
add_shortcode( 'rss', 'my_feed_only_content' );
function my_feed_only_content( $atts, $content = null ) {
if ( is_feed() && !is_null( $content ) )
return $content;
return '';
}
derekfreeze
Member
Posted 4 months ago #
Okay, that code works for text, but it doesnt allow me to embed a video straight into the rss :/