WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] formatting incorrect with shortcode adding line breaks (8 posts)

  1. jaysee412
    Member
    Posted 9 months ago #

    For example http://popgh.com/events/ should look like http://demo.wp-events-plugin.com/events/ so i emailed the them designer to see if they had any suggestion and they said the following:

    That's because for every carriage return in the event shortcode WordPress is adding a br or a p tag which is causing the line breaks that you are seeing. The theme applies the built-in WordPress filters to all shortcodes and content entered into any of the page content areas, which includes rendering carriage returns as br and p tags. I'm not exactly sure how to tell WordPress not to use these filters for plugins, but if I can figure out a way to do this I will update the theme with this. If you figure anything out regarding this I would appreciate the info!

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 9 months ago #

    hmm, I think the problem is that your theme is adding extra p and br tags; maybe you can ask your theme provider on how you can turn this off.

  3. jaysee412
    Member
    Posted 9 months ago #

    I'm not disagreeing totally. I found a lot of hits regarding this being a wordpress issue that it filters or reads it how it wants and throws in its own code. I have not really found a solution. The theme creator offered to add it into next version if he or i can come up with a solution to that but he was not sure. I'm not a programmer so I'm stuck but is this helpful?

    http://seven.collective-b.org/2008/01/09/wordpress-and-adding-line-breaks/

    I even read about people having to clean all the carriage returns out of the code to get the wordpress filter from adding code.

    Thanks for ANY help you can give.

  4. philipjohn
    Member
    Posted 9 months ago #

    Hiya,

    A quick and simple way to test whether this issue is a theme or WordPress one would be to revert to the default theme temporarily. If the extra returns remain, you know it's a WordPress (or plugin) issue, rather than your theme. Otherwise, it's your theme and you can ask the developer to fix it.

    In my test site, using the default theme, I do not get this issue, which suggests that it is caused by your theme or a plugin.

    So, if you DO see the issue in the default theme, it's likely to be a plugin causing the problem. You'll need to disable plugins one-by-one until the issue goes away to find out which one it is. Then, you can inform the plugin developer so that a fix can be found.

    Let us know how you get on!

    Cheers,
    Phil

  5. jaysee412
    Member
    Posted 9 months ago #

    ok so i went to my test site and installed the theme. had issue there also. i disabled all plugins but still had issue.

    switch the theme and it looked ok.

    so yes its something with theme that effecting some plugins. odd that the test site looks fine that the theme editor has up when i test it there.

    the editor is stumped also but willing to help. not sure where to start.

  6. caimin_nwl
    NetWebLogic Support
    Posted 9 months ago #

    Try adding this to the functions.php file of your theme:

    remove_filter ('the_content', 'wpautop');

  7. jaysee412
    Member
    Posted 9 months ago #

    that didnt seem to help or hurt the layout any.

  8. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 9 months ago #

    maybe you need to wrap it in another filter so it gets executed later, e.g.

    function remove_wpautop(){
      remove_filter ('the_content', 'wpautop');
    }
    add_filter('init', 'remove_wpautop');

Reply

You must log in to post.

About this Plugin

About this Topic