"RS Posts slider" – can't pull paragraphs/line-breaks from posts

arne_robot's Avatar

arne_robot

30 Apr, 2019 12:56 AM

Hello. I know that this topic has been discussed here before but I didn't get any of the solutions to work: I need to get the formatting, especially the paragraphs and line-breaks from my WordPress posts into the RS posts slider. I found the below solution on the forum but it won't make my paragraphs or line-breaks show up on the actual website. But the formatting DOES work in the slider preview window…

function newrs_add_content_variable($m, $data, $options) {
    
    $m->addHelper('formatted_content', function() use ($data) {
           return apply_filters('the_content', $data->post_content);
    } );

}
add_filter('new_rs_slides_renderer_helper','newrs_add_content_variable', 10, 4);

Here is my website with the slider: http://zahnumzahn.de/willkommen-test/

Can you help me with this? I don't know how to solve this as I have tried every solution I found online.
Thanks and regards,
Arne

  1. Support Staff 1 Posted by Dmitry Semenov on 30 Apr, 2019 04:47 AM

    Dmitry Semenov's Avatar

    Hello,

    If it works in preview, but doesn't on live site - likely your theme or one of your plugins removes or overrides the filter, via methods like https://wordpress.stackexchange.com/questions/200469/new-method-to-...

    Try to temporarily deactivate other plugins.

    Also, avoid applying a transparent background to slides with a fade transition to ensure smooth transition. You can apply the gradient to .rsSlide element:

    .rsSlide {
        background-image: linear-gradient(to right, rgba(158, 209, 153, 1), rgba(146, 153, 192, 1)) !important;
    }
    
  2. 2 Posted by arne_robot on 30 Apr, 2019 07:42 AM

    arne_robot's Avatar

    Hello,

    thank you for you fast reply! I solved the problem using this plugin ("Toggle wpautop"): https://de.wordpress.org/plugins/toggle-wpautop/

    I also removed the transparent backgrounds.
    http://zahnumzahn.de/willkommen-test/

    Now it seems to work fine!
    Thanks for your help!

  3. arne_robot closed this discussion on 07 May, 2019 10:44 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac