Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #191192

    Hello,

    If you look at the http://eyemaginationdev.com/wondoor/wondoor-fireguard/#tab-id-3, you will see I’m using the [one_fourth] short code and I know my clients will be using it in the visual editor. Is there anyway to remove <br> tags as they keep pushing each column graphic down (I want them to all line up)? I’ve seen an answer by installing Ultimate TinyMCE, but I don’t want <br> to be gone from other parts of the page. Is there a way to modify the shortcode CSS for [one_fourth]?

    #191312

    Hey Brian!

    How did br tags get there? You can add a 4 1/4 columns like the one you have using this:

    [av_one_fourth first]Add Content here[/av_one_fourth]
    
    [av_one_fourth]Add Content here[/av_one_fourth]
    
    [av_one_fourth]Add Content here[/av_one_fourth]
    
    [av_one_fourth]Add Content here[/av_one_fourth]

    Cheers!
    Ismael

    #191318

    Ismael,

    Yep, that’s how I built it. Here’s the code, but keep in mind that I have tried to remove spaces on all the lines of code & still shows the <br> when I look back at WYSIWYG mode:

    [av_tab title='More Info' icon_select='no' icon='ue800' font='entypo-fontello']
    [av_one_fourth first]
    
    [caption id="attachment_104" align="alignnone" width="127"]<img class="size-full wp-image-104" alt="FireGuard (Sweets)" src="http://eyemaginationdev.com/wondoor/wp-content/uploads/2013/11/brochure_fg_sweets.gif" width="127" height="165" /> FireGuard (Sweets)[/caption]
    <ul>
    	<li><a href="/wondoor/cmsdocuments/WonDoor_FireGuard.pdf" target="_blank">Download (pdf)</a></li>
    	<li><a href="/wondoor/cmsdocuments/WD_FireGuard_CHi.pdf" target="_blank">Chinese (pdf)</a></li>
    </ul>
    [/av_one_fourth]
    [av_one_fourth]
    
    [caption id="attachment_102" align="alignnone" width="127"]<img class="size-full wp-image-102" alt="FireGuard Educational Occupancy" src="http://eyemaginationdev.com/wondoor/wp-content/uploads/2013/11/brochure_fg_educaional.gif" width="127" height="165" /> <a href="/wondoor/cmsdocuments/WD_schools.pdf" target="_blank">FireGuard Educational Occupancy</a>[/caption]
    
    [/av_one_fourth]
    [av_one_fourth]
    
    [caption id="attachment_103" align="alignnone" width="127"]<img class="size-full wp-image-103" alt="FireGuard Healthcare Applications" src="http://eyemaginationdev.com/wondoor/wp-content/uploads/2013/11/brochure_fg_healthcare.gif" width="127" height="165" /> <a href="/wondoor/cmsdocuments/WD_healthcare.pdf" target="_blank">FireGuard Healthcare Applications</a>[/caption]
    
    [/av_one_fourth]
    [av_one_fourth]
    
    [caption id="attachment_105" align="alignnone" width="127"]<img class="size-full wp-image-105" alt="FireGuard Targeted Applications" src="http://eyemaginationdev.com/wondoor/wp-content/uploads/2013/11/brochure_fg_targeted.gif" width="127" height="166" /> <a href="/wondoor/cmsdocuments/WD_tri-folds.pdf" target="_blank">FireGuard Targeted Applications</a>[/caption]
    
    [/av_one_fourth]
    #191325

    Hey!

    WordPress will parse your line breaks and turn them into break tags. So working with shortcodes tends to be a bit of a trick unless you only work in the text tab or disable wpautop( http://codex.wordpress.org/Function_Reference/wpautop).

    One thing you may want to try, though it may not be suitable for clients, is using this function:

    
    /*-----------------------------------------------------------------------------------*/
    /* Instead of remove_filter('the_content', 'wpautop');
    /* Removes wpautop from specified pages with a custom field:
    /* Name: autoformat Value: false
    /*-----------------------------------------------------------------------------------*/
    
    function st_remove_wpautop($content) {
        global $post;
        // Get the keys and values of the custom fields:
        $rmwpautop = get_post_meta($post->ID, 'autoformat', true);
        // Remove the filter
        remove_filter('the_content', 'wpautop');
        if ('false' === $rmwpautop) {
        } else {
        add_filter('the_content', 'wpautop');
        }
        return $content;
    }
    // Hook into the Plugin API
    add_filter('the_content', 'st_remove_wpautop', 9);
    

    then when you add the custom field with the name wpautop and give it a value of false it will disable wpautop on that page specifically.

    Otherwise using the advanced layout editor will allow you to add in the layouts without worrying about it.

    Regards,
    Devin

    #191525

    Devin,

    Thanks for the help but it didn’t seem to work. I added the code to my child’s function.php page & then added the custom wpautop custom variable and everything still stays the same.

    Also, I would actually prefer the advanced layout editor but the shortcode functions available (wand icon) within the tabbed content is very limited in options and one option it does not have is the [one_fourth] option. Even if I could add that code in manually, I want the client to be able to add that in whenever they want & by not having that option from the shortcode button / wand, it makes it difficult for them to do. Have any other ideas?

    #191663
    #191702

    The advanced layout editor has more options than what is in the wand icon. I’m not sure if that is what you meant to say but if you want to avoid WordPress messing with spacing then you should use the advanced layout editor.

    If you are trying to use shortcodes within a text element inside of the advanced layout editor then that isn’t actually supported at the moment since there isn’t coding in place for full stacking inside the text element.

    #191706

    Devin,

    “If you are trying to use shortcodes within a text element inside of the advanced layout editor then that isn’t actually supported at the moment since there isn’t coding in place for full stacking inside the text element.”

    This is exactly the issue I am having. I am using the advanced editor when I can (pretty slick might I add), but on the pages that use tabs, you have to use a text element w/ less features as you stated. So I’m stuck with the shortcodes unless you have another idea for laying out what you see at http://eyemaginationdev.com/wondoor/wondoor-fireguard/

    If there are no options, do you have any suggestion on why wpautop isn’t working when I add it to the functions.php page (and adding in the custom field)?

    Thanks,
    Brian

    #191708

    Devin,

    I also went more into the WP documentation on this & installed the plug-in that should make this all work (http://wordpress.org/support/plugin/wpautop-control) – still not working. I even made a new page & it wouldn’t work there either.

    #191711

    Nesting shortocodes inside tabs is going to be somewhat touchy and will never be suitable for handing off to a client easily. Even with how many layout options there are with the theme and shortcodes some things are just not suitable.

    For that kind of layout what I would normally do is only edit it in the text tab and never let the visual editor touch it.

    On that page specifically you can do somewhat of a workaround and use:

    #top.page-id-38 #tab-id-4-container br {
    display: none;
    }

    To target that page and the tab with the columns and then remove the breaks from rendering.

    #191720

    Devin,

    Pretty slick work-around and that did the trick. I had no idea you could apply CSS to a specific tab and is exactly what I’m looking for. Thanks!

    #192284

    Glad we could help. Let us know if you have any other questions or issues.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Remove return breaks from shortcode [one_fourth]’ is closed to new replies.