WordPress.org

Ready to get started?Download WordPress

Forums

Flexible Posts Widget
[resolved] HTML Validation error in default widget.php (3 posts)

  1. Carsten Bach
    Member
    Posted 1 year ago #

    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/

  2. DaveE
    Member
    Plugin Author

    Posted 1 year ago #

    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!

  3. Carsten Bach
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic