Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #542497

    Hi Support-Team

    At the end of my Blog post I have several Shortcodes (for example a Button, a Tab and Social Sharing). How can I remove/hide all Shortcodes in the RSS Feed?

    Thanks for your quick reply,

    Best, Marcel

    #542863

    Hey mahu,

    Could you provide us with a link to the site in question so that we can take a closer look please?

    Best regards,
    Rikard

    #545104

    Hi Rikard

    Take look at the following link and the pictures (private).

    Thanks for your quick reply,

    Best, Marcel

    #546721

    Hey!

    Please take a look here:
    http://www.deluxeblogtips.com/2010/04/wordpress-customize-feed-length-and.html

    and maybe you can also use a shortcode to pick what you load to feeds:
    http://theme.fm/2011/08/adding-feed-only-and-site-only-shortcodes-in-wordpress-1604/

    let usk now if you need more assistance

    Cheers!
    Basilis

    #548888

    Hey!

    Thanks for your hints. I took a look at the first link. So the code should be like this:

    Customize Feed in WordPress in functions.php

    add_filter('the_excerpt_rss', 'dbt_custom_feed');
    add_filter('the_content', 'dbt_custom_feed');

    Hide all Shortcode also in functions.php:

    function dbt_custom_feed( $content )
    {
    	global $post;
    
    	if ( ! is_feed() )
    		return $content;
    
    	// Remove all shortcodes
    	$content = strip_shortcodes( $post->post_content );
    
    return $content;
    }

    Does this code need to be on a specific line in the functions.php?

    Thanks for your help.

    Best,
    Marcel

    #551675

    Hi!

    Place it in your child theme functions.php, if you don’t have one, create it.

    Cheers!
    Josue

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.