Support » Plugin: Parallax Scroll by adamrob.co.uk » Paragraph tags getting stripped and parallax images not responsive

  • When I input the parallax scroll shortcode on my page, it strips all the <p> paragraph tags and the paragraphs become one. How do you fix this?

    Also, the parallax images are not responding responsively. I have the Mobile: Image Size set to 0 (and the Full Width option is checked). How do you make the images responsive?

    Thank you in advance for your help!

    https://wordpress.org/plugins/adamrob-parallax-scroll/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author adamrob

    (@adamrob)

    Hi, in its current state, the images are not responsive. Version 2.0 which is very close will have an option for responsive images.

    As for the <p> tags, i have not came across it before. Have you tried it with a standard theme? my guess is there may be an incompatibility with the theme; however I can’t diagnose without looking at the specific case.

    Hi,

    first thing first. Thanks for that useful plugin.

    I had the same problem with the <p>. WordPress itself adds the paragraph, not the plugin. It toke me over 2h the get rid of that.

    The solution, that worked for me was adding a small function to the functions.php in the theme folder, which removes the paragraphs in a chosen shortcode. In case of this plugin the shortcode is parallax-scroll.

    function the_content_filter($content) {
    	// array of custom shortcodes requiring the fix
    	$block = join("|",array("parallax-scroll"));
    	// opening tag
    	$rep = preg_replace("/(<p>)?\[($block)(\s[^\]]+)?\](<\/p>|<br \/>)?/","[$2$3]",$content);
    
    	// closing tag
    	$rep = preg_replace("/(<p>)?\[\/($block)](<\/p>|<br \/>)?/","[/$2]",$rep);
    	return $rep;
    }
    add_filter("the_content", "the_content_filter");
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Paragraph tags getting stripped and parallax images not responsive’ is closed to new replies.