136 posts
  • Bought between 1 and 9 items
  • Sold between 5 000 and 10 000 dollars
  • Exclusive Author
  • Europe
  • Has been a member for 0-1 years
WPEnter says

1. remove these – http://d.pr/i/eECn – This is a poor practice and we’re encouraging authors to use another methods rather than stripping out or modifying the_content() output as this may cause problems with third party plugins.

Can anyone help, is there any other way to escape p and br tags in shortcodes.

270 posts New Elite in Town!
  • Won a Competition
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Romania
  • Has been a member for 2-3 years
  • Exclusive Author
  • Bought between 10 and 49 items
+1 more
icypixels says

That is indeed extremely poor practice and content locking your users with your shortcodes is indeed not desired on ThemeForest. Try using one of the open source page builders available like Aqua Page Builder in order to avoid the shortcode mess.

Paul

136 posts
  • Bought between 1 and 9 items
  • Sold between 5 000 and 10 000 dollars
  • Exclusive Author
  • Europe
  • Has been a member for 0-1 years
WPEnter says

I have finished my theme , i can not change the whole theme because of shortcode p and br tags. I will just delete that function.

136 posts
  • Bought between 1 and 9 items
  • Sold between 5 000 and 10 000 dollars
  • Exclusive Author
  • Europe
  • Has been a member for 0-1 years
WPEnter says

Can anyone who has approved WP theme, tell me how they resolve that problem… PLEASE…!!

279 posts
  • Sold between 50 000 and 100 000 dollars
  • Exclusive Author
  • Has been a member for 1-2 years
  • Bought between 10 and 49 items
  • Referred between 10 and 49 users
PrimaThemes says

First, the message is very clear, do not use the_content filter to fix shortcode issue. Do not use it.

Second, in your code, you over-do it. Some of those shortcode do not need the fix. br and all single line shortcode do not need the fix.

You need to check closely what are your custom shortcodes that need this fix. Then you can simply fix it case by case, only for specific shortcode, before returning shortcode output.

136 posts
  • Bought between 1 and 9 items
  • Sold between 5 000 and 10 000 dollars
  • Exclusive Author
  • Europe
  • Has been a member for 0-1 years
WPEnter says

First, the message is very clear, do not use the_content filter to fix shortcode issue. Do not use it…
Thank you for your reply, but problem is not by adding p or br tags inside the shortcode, the problem is that if i add for example 2 shortcodes: [shortcode1] br or p tag [shortcode2]. As you can see the problem is by adding br or p tags betweet shortcodes and then it looks awful.
136 posts
  • Bought between 1 and 9 items
  • Sold between 5 000 and 10 000 dollars
  • Exclusive Author
  • Europe
  • Has been a member for 0-1 years
WPEnter says
Probably i can make it to looks as it needs, but then shortcodes will looks like this.
http://i.imgur.com/KqiFs6B.png

It is hard to modify and understand what shortcodes are added here, and there is another problem here is still p on the bottom of the page which i can not remove.
279 posts
  • Sold between 50 000 and 100 000 dollars
  • Exclusive Author
  • Has been a member for 1-2 years
  • Bought between 10 and 49 items
  • Referred between 10 and 49 users
PrimaThemes says

Probably i can make it to looks as it needs, but then shortcodes will looks like this.
http://i.imgur.com/KqiFs6B.png

I say, WOW, that is not the purpose of shortcode. It is not readable, and give your user a killer “lock in” effect.

There are missing linebreaks for all shortcodes and it possibly creates unnecessary br and p tags on the output. This is not a good practice at the first place.

Basically you are okay to do it like that, but please make the content on WordPress WYSYWYG editor more readable and then you will only need to solve minimal issue, just like my suggestion above.

If my advice above is not okay for you, you still have some possible solutions.

1) Port your shortcodes to a plugin, your shortcode plugin, and use TGM to automatically install it when user activate your theme

2) Use third party shortcode / page builder plugin, for example Shortcode Ultimate, Visual Composer, etc

136 posts
  • Bought between 1 and 9 items
  • Sold between 5 000 and 10 000 dollars
  • Exclusive Author
  • Europe
  • Has been a member for 0-1 years
WPEnter says
I say, WOW, that is not the purpose of shortcode. It is not readable, and give your user a killer “lock in” effect….
Thank you for advices, i will try to minimize p and br tags if it’s possible, but if not i will definitely try to use some of these plugins.

Yes my shortcodes are in the plugin and i am using TGM to activate it.
1719 posts Don't Worry, Be Happy
  • Beta Tester
  • Grew a moustache for the Envato Movember competition
  • Elite Author
  • United States
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 3-4 years
  • Referred between 200 and 499 users
  • Most Wanted Bounty Winner
+2 more
FinalDestiny says

Yes, I’m afraid there’s no official way to fix it, so your users will need to use the shortcodes on the same line in order to get the desired layout. That’s only if you use shortcodes. I did that in my themes where I’ve used shortcodes only and my buyers didn’t complain at all. Or you could integrate them with the WP editor and ask them to fill just the details… and the theme should automatically insert the shortcodes based on the content

by
by
by
by
by
by