WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Flexible Posts Widget] HTML Validation error in default widget.php

[Resolved] [Plugin: Flexible Posts Widget] HTML Validation error in default widget.php

  • Hi DaveE,

    there is a small, but ugly, HTML error in your default widget template in /views/widget.php

    You have the echo $after_widget; statement within your if( $flexible_posts->have_posts() ) conditional, so by default a closing </div> is missing and messes up the sidebar output.

    Before

    [...]
    		</ul><!-- .dpe-flexible-posts -->
    <?php
    		echo $after_widget;
    
    else: ?>
    	<div class="no-posts dpe-flexible-posts">
    		<p>No post found</p>
    	</div>
    <?php
    	endif; // End have_posts()
    ?>

    After

    [...]
    </ul><!-- .dpe-flexible-posts -->
    <?php else: ?>
    	<div class="no-posts dpe-flexible-posts">
    		<p>No post found</p>
    	</div>
    <?php
    		echo $after_widget;
    	endif; // End have_posts()
    ?>

    I mentioned it while fetching a taxonomy with no posts in.

    http://wordpress.org/extend/plugins/flexible-posts-widget/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author DaveE

    @dpe415

    Hi Carsten,

    Well, that’ll make a guy feel a bit foolish. Thank you for pointing that out. I’ve updated the plugin with a correct source order for the if/else and the before/after widget.

    Cheers!

    He DaveE, great you fixed it so fast. Thanks and don’t feel foolish, you did very good work with your Plugin at all.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: Flexible Posts Widget] HTML Validation error in default widget.php’ is closed to new replies.