Support » Theme: Social Magazine » Catgory pages get increasingly wonky as you scroll down

  • Resolved squiggly

    (@squiggly)


    So I wanted to create category “pages” that displayed all the posts from a certain category into header menu e.g. “News”, “Humor”, etc. The problem arises when I open the page and scroll through it, each post image, headline, and text get wider and wider on the display than the one before it, until the images are HUGE and can’t even fit into the display. It looks ridiculous.

    I wonder if anyone knows what’s going on or if you need more info?

    Thanks much!

Viewing 8 replies - 1 through 8 (of 8 total)
  • possibly an unclosed html tag.

    is that a template you have created or edited yourself?

    if so, please post the full code of the template.

    it might also be useful if you post a link to the page with the issue.

    Thanks for the quick reply. If it’s a unclosed tag, then I wouldn’t know even where to find it. Here is a link to one of the affected pages: http://thedailyextra.com/category/lists/ As you can see, the first post looks fine, then it gets screwy.

    Here is the category.php template below. I hope that’s what you mean. Thank you kindly for your help!

    <?php
    defined('ABSPATH') or die("please don't runs scripts");
    /*
    * @file           category.php
    * @package        Social Magazine
    * @author         ThemesMatic
    * @copyright      2015 ThemesMatic
    */
    get_header(); ?>
    
    <div class="wrap">
    	<div class="container">
    		<div class="col-md-8 blog">
    
    		<h1><?php _e("Category:", 'social-magazine' ); ?> <?php single_cat_title(); ?></h1>
    
    		<?php
    		// Check if there are any posts to display
    		if ( have_posts() ) : ?>
    		<?php
    
    		// The Loop
    		while ( have_posts() ) : the_post();
    
    		get_template_part( 'content'); 
    
    		endwhile; ?>
    
    				<div class="navigation">
    					<div class="alignleft">
    						<?php previous_posts_link( __( '← Previous Article', 'social-magazine' ) ); ?>
    					</div><!-- /alignleft -->
    					<div class="alignright">
    						<?php next_posts_link( __( 'Next Articles »', 'social-magazine' ) ); ?>
    					</div><!-- /alignright -->
    				</div><!-- /navigation -->
    
    		<?php else :
    
    		get_template_part( 'content', 'none');
    
    		endif; ?>
    	</div><!-- /col-md-8 blog -->
    <?php get_sidebar(); ?>
    </div><!-- /container -->
    <?php get_footer(); ?>

    the above seems to be ok;

    the error seems to be an extraneous closing </div> somewhere, possibly in content.php –

    please check and post the code of content.php

    Thanks! Here it is:

    <?php
    /*
    * default template used for the loop
    */
    ?>
    
    		<h2 id="post-<?php the_ID(); ?>" <?php $classes = array('align-left','social-magazine-one-post-link',); post_class( $classes ); ?>><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    
    	<?php get_template_part( 'post', 'date' );
    
    	if ( has_post_thumbnail() ) { the_post_thumbnail(); }
    
    	get_template_part( 'post','meta' );
    
    	the_excerpt(); ?>
    		<p class="posted-in">
    			<small>
    			<?php if (has_category()) { ?><?php esc_attr_e('Posted in ', 'social-magazine' ); ?><?php the_category(', ') ?><?php } ?>
    			<?php the_tags(__('Tagged with: ', 'social-magazine')); ?>
    			</small>
    		</p>
    </div><!-- /blog-block -->

    did you edit that template and removed the <div> at the start?

    this is the original:
    https://themes.svn.wordpress.org/social-magazine/1.9.1/content.php

    i.e. try and put this line back at the start:

    <div class="post blog-block">

    That fixed it!! Thank you so much! Was there a reason I would have taken that out? Does it change anything in the post layout that I should be aware of?

    there should have been no reason whatsoever to take the line out.

    if anything at all, it would break the layout.

    Excellent. Well I thank you again for your speedy and expert analysis and resolution! Good day and thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Catgory pages get increasingly wonky as you scroll down’ is closed to new replies.