• Resolved upavadi

    (@upavadi)


    Great plugin. My problem is that additional line feeds are added to the html.

    <div class="entry-container fix">
            <div class="entry fix">
                <ul id="tabs" class="tabs"></ul>
                <br></br>
                <section id="tab-1" class="tab"></section>
                <br></br>
                <section id="tab-2" class="tab"></section>
                <br></br>
                <section id="tab-3" class="tab"></section>
                <br></br>
                <section id="tab-4" class="tab active"></section>
                <br></br>
            </div>

    I am not sure whether this is because I am using dedicated css rather than adding css to theme style sheet.
    My demo site is here.
    I look forward to your input.
    TIA

    https://wordpress.org/plugins/tabs-shortcodes/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter upavadi

    (@upavadi)

    Just to add: I have just noticed that clicking outside a tab but within the id=tabs breaks the css. I think this is what JustBlog referring to.

    Plugin Author philbuchanan

    (@philbuchanan)

    My guess is this is a result of line breaks in your tabs shortcodes code. Try removing all line breaks from around your shortcodes and let me know if that solves the issue.

    I’ll look into the other issue.

    Thread Starter upavadi

    (@upavadi)

    Thanks. That’s fixed it. I had seen your comment before but – stupid me – did not understand what it meant.
    Thanks again.
    This is the only plugin that works without breaking other jqueries.

    Thread Starter upavadi

    (@upavadi)

    Addendum: FYI, I am still getting line breaks in my current active theme, 2012. I do not see any line breaks in html. So may be, its my style.css has got messed up. Works well in 2011, 2013 and suffusion.

    <div class="entry-content">
    ?¶??????
    <ul id="tabs" class="tabs">
    <li>
    <li>
    <li>
    </ul>
    <section id="tab-1" class="tab active"></section>
    <section id="tab-2" class="tab"></section>
    <section id="tab-3" class="tab"></section>
    ?¶??????????
    </div>
    Plugin Author philbuchanan

    (@philbuchanan)

    This may not be ideal, but you can filter the_content to remove <p> and <br> tags around shortcodes by adding this to your functions.php file:

    add_filter('the_content', 'shortcode_empty_paragraph_fix');
    function shortcode_empty_paragraph_fix($content) {
    	$array = array (
    		'<p>[' => '[',
    		']</p>' => ']',
    		']<br />' => ']',
    		']<br>' => ']'
    	);
    	$content = strtr($content, $array);
    
    	return $content;
    }

    Keep in mind this will filter ALL the content for a post so you may have unexpected results with other plugins/shortcodes. Be careful and use at your own risk!

    Thread Starter upavadi

    (@upavadi)

    Thanks for responding. I shall try that

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Tabs introducing addtional breaks’ is closed to new replies.