Hi, I am using styledbox shortcode and paragraphs are shown (transformed to HTML tags) and break lines not. There is remove_wpautop() function which should remove both? Is there any chance to show break lines from WordPress editor when using styledbox shortcode? Thank you very much!
I’ve changed this for the next version, however if you want to change it yourself, follow the guide below.
Search for the line:
$output .= "\n\t\t".'<div class="boxcontent clearfix '. $inner_type .'" '. $inner_style .'>'. remove_wpautop($content) .'</div>';
$output .= "\n\t\t".'<div class="boxcontent clearfix '. $inner_type .'" '. $inner_style .'>'. do_shortcode($content) .'</div>';
I’ve stopped using the map.php file now, the maps are placed individually within each shortcode file, e.g. DynamiX/lib/inc/shortcodes/styled-boxes.php
The code has do_shortcode($content) – so I’m not sure why it’s not working. What styledbox is it, there is the older shortcode method that has the remove_wpautop($content) method, you could try changing them to, within the styled-boxes.php file?
By the looks of things, the br tags work but shift+enter no longer works in visual composer. If you hit enter instead of shift+enter it drops it on another line with a space in-between within VC but on the front end it appears how you want it to look, on a new line with no space. If you want to have the look of a new paragraph on the front end, you will need to hit enter twice within VC.
Hope this makes sense.
Sorry, but it does not make sense for me…
In Visual composer works Enter and also Shift + Enter, I can see it when I switch to HTML editor. You can test it:
1) Insert Styled Box into editor.
2) Insert Text Block into Styled Box (I did not find any other way to insert text into Styled Box).
3) Insert following text into HTML editor:
- first new line (Shift + Enter)
Second paragraph (Enter)
- second new line (Shift + Enter)
It looks nice in Editor and Visual composer, but on website there are no new lines and no breaks. There are only two paragraphs.
And big problem is also with back comaptibility. We have really many old Styled boxes and everything worked well in 3.0.x, but with 3.1 there is old problem (ignoring break lines).
Thank you for your help…
It is just something that Visual Composer seems to have added. If you Shift + Enter twice it produces the space you are after.
We will ask Visual Composer about this though. Does it just do it in a styled box or just in text block too?>? Test this out for me also.
I do not think, that it is related to Visual Composer.
Problem is also visible when there is no Visual Composer used (only shortcode in Classic editor).
It worked fine until there was change in latest release (Andy wrote that there is no more map.php used).
If I use Shift + Enter twice, then there is new paragraph and not only break line.
Text Block is fine and everything works well as expected, problem is only with Styled Box.
Thank you for your help!
Try updating the following file to see if this resolves your problem.
You must be logged in to reply to this topic.