Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • Is it possible to remove it in the RSS feed itself ?

    RSS reader will display the description as is. The plugin has no idea about the text.

    Other suggestion I can think of is in feed.php search for below line

    $desc = str_replace( array( "\n", "\r" ), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ) ) ) );

    and replace it with below

    $desc = str_replace( array( "\n", "\r" ), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ), '<span>' ) ) );

    Then use the CSS .informations{display: none}

    Thanks,
    Aakash

    Ed Native
    Participant

    Can you check on your site?
    [srr_feed urls="https://natives.chat/c/korean/26.rss" count="9" show_desc="1" show_thumb="1" strip_desc="30" rich_desc="0" add_nofollow="1" open_newtab="1" thumbnail_position="cover" read_more="0" thumbnail_size="350px" color_style="twitter" display_type="grid" grid_columns="3"]

    I can’t modify rss and there is no this <span class=”informations”> – it is only available in the rss.

    the only way is to exclude it by your plugin

    Can you please try the suggestion I have mentioned earlier ?

    Ed Native
    Participant

    I replaced with your code, but all span elements are within the <p> tag and are not html codes – they are plain text

    <p><span class="filename">image</span><span class="informations">1280×798 615 KB</span> </p>

    Please hold on..

    Revert back the change I last asked.

    Now, paste these lines

    $a = explode('KB', $desc);
    if(count($a) > 1){
    	$desc = $a[1];
    }else{
    	$desc = $a[0];
    }

    after this line

    $desc = str_replace( array( "\n", "\r" ), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ) ) ) );

    Ed Native
    Participant

    that worked, but sometime there is no KB, but MB
    image3500×2885 1.29 MB

    Instead of this
    $a = explode('KB', $desc);

    use this
    $a = preg_split('/ (KB|MB) /', $desc);

    Cheers !

Viewing 9 posts - 16 through 24 (of 24 total)
  • You must be logged in to reply to this topic.

Subscribe for updates

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter