-
-
Save jimboobrien/8004e8d20a05e95d7a00acfe11e15b17 to your computer and use it in GitHub Desktop.
WordPress shortcode allows you to create content that is visible only in your RSS feeds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WordPress shortcode allows you to create content that is visible only in your RSS feeds. | |
* | |
* Example: [feedonly]Dear RSS readers...[/feedonly] | |
*/ | |
function feedonly_shortcode( $atts, $content = null) { | |
if (!is_feed()) return ""; | |
return $content; | |
} | |
add_shortcode('feedonly', 'feedonly_shortcode'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment