Sunday, June 9, 2013

[Help Wordpress] Slider from posts removes paragraph tags


Slider from posts removes paragraph tags



I had the same issue - using a custom twentyten child theme, with no filters applied in the child, all other plugins disabled.


I had a look at the RS source and saw that your posts renderer is spitting out the raw post_content data from the WP_Post object. This is not the default behavior when WP renders a normal post though -- the autop filter and others are applied by default as part of the the_content() function. Thus, RS is rendering posts differently than a vanilla WP post page.


I worked around this by adding a filter to my child theme's functions.php file:



function rs_standardize_post_contents($m, $data, $options) {
if (is_a($data, 'WP_Post')) {
$data->post_content = apply_filters('the_content', $data->post_content);
}
}
add_filter('new_rs_slides_renderer_helper', 'rs_standardize_post_contents', 10, 4);


Cheers,
David



.

help.dimsemenov.com

No comments:

Post a Comment

Search

Other post

[Top WP themes 2013] [Woocommerce themes] Razzo Premium Business / eCommerce WordPress Theme (WooCommerce)
[Woocommerce themes] Razzo Premium Business / eCommerce WordPress Theme (WooCommerce)
[Woocommerce themes] Razzo Premium Business / eCommerce WordPress Theme (WooCommerce)Back ...
[Top WP themes 2013] [Woocommerce themes] TenderShop - Minimal Wordpress eCommerce Theme (WooCommerce)
[Woocommerce themes] TenderShop
[Woocommerce themes] TenderShop - Minimal Wordpress eCommerce Theme (WooCommerce)Back to H...
[Help Wordpress] can't add image
can't add image
i'm having issues adding images. i click "click to add an image", i add media files from y...
[Help Wordpress] Installing Royal Slider - beware the file zip :-)
)
Hi,It's not an issue, just a comment. I bought RS, 3 days ago, download it and try the ins...
[Help Wordpress] Responsive mode
Help Wordpress
Hi all.I am using this plugin for the first time so any help would be great.I have the sli...