This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Swagger + Wp-Types = Unwanted paragraph tags

  • Creator
    Topic
  • #3564
    timworx
    Participant

    http://support.themeblvd.com/forums/topic/adding-unwanted-paragraph-tags/

    Hello, I received Swagger with a bundle a while back. I’ve recently had a project for and started buildign up the child theme. In trying to use it with Wp-Types I was getting extra paragraph tags added in. A solution was using the shortcode plugin to be able to turn off the raw shortcode. However, the Swagger theme in the bundle didn’t have framework v2.2+ so it didn’t work with the shortcode plugin. After much time wasted trying to figure out and alternate solution, I’ve resorted to downloading the latest version of Swagger since the description said that it was built on the “all-new version 2 of the Theme Blvd framework”. I assumed this meant it had the latest version of framework 2. Alas, this doesn’t appear to be the case, as it shows it only being 2.1.

    Is there another way to disable the RAW shortcode?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #3580
    Jason Bobich
    Keymaster

    Hello,

    I apologize for the confusion. The next update to Swagger will contain framework v2.2. It’s a big update (as the previous update to v2.1 was) and we’re currently working on it across all themes on ThemeForest.

    For now, this is how you could disable this. —

    Within the Swagger parent theme, open /framework/shortcodes/shortcodes.php and find these lines:

    remove_filter( 'the_content', 'wpautop' );
    remove_filter( 'the_content', 'wptexturize' );
    remove_filter( 'the_content', 'shortcode_unautop' );
    add_filter( 'the_content', 'themeblvd_content_formatter', 9 );

    And comment them out:

    // remove_filter( 'the_content', 'wpautop' );
    // remove_filter( 'the_content', 'wptexturize' );
    // remove_filter( 'the_content', 'shortcode_unautop' );
    // add_filter( 'the_content', 'themeblvd_content_formatter', 9 );
    #3642
    timworx
    Participant

    You are the man. I’ve commented them out, however, now the [raw] tag appears if I try to use anything like the tabs. Another potential fix I’ve found from play with this code is removing “wpautop” from around “$piece” in the line $new_content .= shortcode_unautop( wptexturize( wpautop( $piece ) ) );

    I’ve left everything commented out that you suggested, other than the last line.
    This appears to have fixed my problem. Think it will create any others?

    #3657
    Jason Bobich
    Keymaster

    If you wanted to removed the [raw] shortcode, than you won’t be able to use it, right? 😉 … But I’m wondering if the confusion here is that you think it’s required to use [raw] with your shortcodes like tabs?

    You don’t have to; this just makes things cleaner by removing the WordPress automatic formatting when you’re trying to setup things like tabs. So, take the [tabs] shortcode as an example. You just have to be aware of WP automatic formatting happening.

    So, for example, you may not be able to just do this:

    [tabs style="framed" tab_1="Tab #1" tab_2="Tab #2" tab_3="Tab #3"]
    [tab_1]First tab content here.[/tab_1]
    [tab_2]Second content here.[/tab_2]
    [tab_3]Third tab content here.[/tab_3]
    [/tabs]

    You may have to set it up more like this:

    [tabs style="framed" tab_1="Tab #1" tab_2="Tab #2" tab_3="Tab #3"] [tab_1]First tab content here.[/tab_1] [tab_2]Second content here.[/tab_2] [tab_3]Third tab content here.[/tab_3] [/tabs]

    … which is sort of the beauty of the [raw] shortcode.

    Another potential fix I’ve found from play with this code is removing “wpautop” from around “$piece” in the line $new_content .= shortcode_unautop( wptexturize( wpautop( $piece ) ) );

    Sure, if you’re okay with stripping out wpautop from your WordPress posts and pages, that’s fine, too.

    • This reply was modified 7 years, 7 months ago by Jason Bobich. Reason: *trying to do things like TABS
    • This reply was modified 7 years, 7 months ago by Jason Bobich.
    #3683
    timworx
    Participant

    Ha! Well, I hadn’t even realized that the raw code was in there… I thought that it was being automatically inserted. I didn’t realize it had been inserted when I inserted the tabs. I haven’t looked at the code itself in a while because fixing this had been an ongoing process with waiting from responses from WP-Types.

    Great!
    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The forum ‘Swagger Responsive WordPress Theme’ is closed to new topics and replies.