bigspring / monolith

A starter theme for WordPress built with Twitter Bootstrap
MIT License
9 stars 1 forks source link

Pagination style messes up spacing when <10 posts queried #345

Closed dmseaton closed 8 years ago

dmseaton commented 8 years ago

The pagination part is styled with vertical spacing.

This means that for any paginated snippet view with fewer than 10 posts queried, the pagination digits don't appear but the spacing is there and looks wack.

This should resolve the issue:

<?php if ( count( $loop->posts ) > get_option( 'posts_per_page' ) ) : ?>
    <?php include( $layouts_path . 'organisms/pagination.php' ); ?>
<?php endif; ?>

Note that the pagination part include needs to be moved into the snippet loop (it currently resides outside the loop and is being loaded even if there is no content).

juliotaylor commented 8 years ago

Is the organism using the proper foundation markup for pagination? http://foundation.zurb.com/docs/components/pagination.html

dmseaton commented 8 years ago

Yes it is - problem is the default vertical spacing on the pagination markup is present unless excluded. the above logic excludes pagination until the site's default posts_per_page setting is hit.

juliotaylor commented 8 years ago

The above code doesn't work – it never displays the pagination part, even if the number of posts available is higher than the posts per page setting in Settings -> Reading.

jrgmartin commented 8 years ago

fixed in 961dc93a434f2e92dcdbe0414c5167529f7301e3