ThemeForest

Shortcodes and wpautop()

679 posts
  • Attended a Community Meetup
  • Bought between 50 and 99 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 3-4 years
  • Most Wanted Bounty Winner
  • Referred between 500 and 999 users
+2 more
mordauk says

@cosmincotor there really isn’t a great code snippet out there. I would personally recommend not trying to use any code snippet as every single one of them goes against what should be happening.

I also wouldn’t be including short codes (except very specialized ones in your themes). For example, if you want to add columns, suggest your users install this plugin: https://github.com/justintadlock/grid-columns

The problem is actually an issue with WordPress, not themes (except themes that try to fix it). The best thing to do is work on fixing the issue in core and submit a patch.

2079 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Community Moderator
  • Bought between 50 and 99 items
  • Referred between 200 and 499 users
  • Has been a member for 4-5 years
  • Won a Competition
+10 more
mpc moderator says

Would be nice to provide the fix since you started the thread and others may be intersted :d

I have used this plugin, those of the users who will have a problem with the paragraph tags and breaks added to the shortcodes will use it and the others wont. Maybe it’s not the best… next time I will try the solution from this topic ;)

183 posts
  • Sold between 10 000 and 50 000 dollars
  • Exclusive Author
  • Europe
  • Bought between 10 and 49 items
  • Referred between 10 and 49 users
  • Microlancer Beta Tester
  • Has been a member for 2-3 years
cosmincotor says

@cosmincotor there really isn’t a great code snippet out there. I would personally recommend not trying to use any code snippet as every single one of them goes against what should be happening.

I also wouldn’t be including short codes (except very specialized ones in your themes). For example, if you want to add columns, suggest your users install this plugin: https://github.com/justintadlock/grid-columns

The problem is actually an issue with WordPress, not themes (except themes that try to fix it). The best thing to do is work on fixing the issue in core and submit a patch.

Well, I guess I’ll have to re-think the shortcodes (which ones are absolutely necessary), and hopefully WP will receive an update that deals with this issue.

Thanks :)

no-thumbnail
AvantInnovations Recent Posts
Threads Started
1 post
  • Bought between 10 and 49 items
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
AvantInnovations says


@cosmincotor there really isn’t a great code snippet out there. I would personally recommend not trying to use any code snippet as every single one of them goes against what should be happening.

I also wouldn’t be including short codes (except very specialized ones in your themes). For example, if you want to add columns, suggest your users install this plugin: https://github.com/justintadlock/grid-columns

The problem is actually an issue with WordPress, not themes (except themes that try to fix it). The best thing to do is work on fixing the issue in core and submit a patch.

Well, I guess I’ll have to re-think the shortcodes (which ones are absolutely necessary), and hopefully WP will receive an update that deals with this issue.

Thanks :)

I wouldnt hold your breath

288 posts
  • Microlancer Beta Tester
  • Bought between 10 and 49 items
  • Sold between 1 000 and 5 000 dollars
  • Europe
  • Has been a member for 0-1 years
  • Exclusive Author
greenline says
There are many best-selling TF themes which still use for instance: $new_content .= wptexturize(wpautop($piece));

This forces wpautop and messes up the content generated by the new plugin I am working at. It adds <p></p> to my generated content and I haven’t found any good solution yet to get rid of the <p></p> added

I thought theme authors are not allowed to force wpautop?? Or are they?

by
by
by
by
by