• Resolved samjolley

    (@samjolley)


    I’m using WordPress 4.1.1, Genesis 2.1.2, and the Magazine Pro Child Theme. The site url is http://vcs.samjolley.com/?cat=31

    I included the_loop_wp_tiles(); in a custom archive.php template so I could display the post archives as a grid.

    I’m having trouble with the outputted tiles. At 1280px everything seems to work fine, but any larger or smaller there’s a “load more” button to the right of the tiles instead of on the bottom.

    Here’s the code for the archive.php template:

    <?php
    /*
    Template Name: Archives
    */
    
    get_header(); ?>
    
    <div id="sidebar"
    <aside class="sidebar sidebar-primary widget-area">
    	<?php dynamic_sidebar('sidebar'); ?>
    </aside>
    </div>
    
    <div id="container">
    	<div id="content" role="main">
        	<?php the_loop_wp_tiles(); ?>
    	</div><!-- #content -->
    </div><!-- #container -->
    <?php get_footer(); ?>

    Here’s the css I added for the tiles so far:

    /* WP Tiles */
    .wp-tiles-container {
      width: 70% !important;
      background: none;
      float: left;
      padding-left: 30px;
     }

    Is there anything I missed in the template, or some custom css I could use?

    Thanks!

    https://wordpress.org/plugins/wp-tiles/

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

    (@mike_cowobo)

    Hi @samjolley!

    The styles you added make WP Tiles always display at 70% of the container width. Which is correct when the sidebar is taking op 30% of the screen, but not when you are in the small screen layout, and WP Tiles should take up a 100% of the screen.

    Looking at the markup of other pages on your site, the layout normally done by a container with the class content. The most durable solution for you would be to look at other templates in your theme, and copying their mark up, so you don’t have to add styles manually.

    Try adding the content class to your container (and removing the WP Tiles you added) and work from there. It should do the trick!

    Cheers,
    Mike

    Thread Starter samjolley

    (@samjolley)

    Wow, adding the content class to the container worked perfectly! You’re the man!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sidebar-Content CSS for Category Archive Template’ is closed to new replies.