WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [modularity lite theme] How to fix comments on page? (3 posts)

  1. dczepiel
    Member
    Posted 4 years ago #

    Please see my Guest Book and maybe you could help me fix the code so that the comments appear correctly.

    By default modularity lite does not have the option to allow comments on pages (only on posts) but I read somewhere that it is enough to add the following to the page.php file:

    <?php get_header(); ?>
    <div class="span-<?php
    		$sidebar_state = get_option('T_sidebar_state');
    
    		if($sidebar_state == "On") {
    			echo "15 colborder home";
    		}
    		else {
    			echo "24 last";
    		}
    		?>">
    <div class="content">
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<div class="post" id="post-<?php the_ID(); ?>">
    			<h2><?php the_title(); ?></h2>
    			<?php include (THEMELIB . '/apps/multimedia.php'); ?>
    			<?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
    			<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    		</div>
    		<?php endwhile; endif; ?>
    	<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    	</div>
    	</div>
    	<?php
    		$sidebar_state = get_option('T_sidebar_state');
    
    		if($sidebar_state == "On") {
    			get_sidebar() ;
    		}
    		else {
    			echo "";
    		}
    		?>
    <?php comments_template(); ?>
    <!-- Begin Footer -->
    <?php get_footer(); ?>

    The only thing I edited is to add the <?php comments_template(); ?> since that was supposed to fix the comments on pages problem. But now it looks all mixed and every new comment makes the website complete unreadable so I'd rather delete it than leave it. On the other hand I cannot have the Guest Book as a post, because the 'Photography" albums are post categories itself so adding a Guest Book as a post would automaticaly add a link to it there... and I don't want it.

    Do you know how I could edit that to have the comments on Guest Book page fixed?

  2. dczepiel
    Member
    Posted 4 years ago #

    Found solution on another website

    In the style.css file the margin for this line was -135px, which looked wrong to me...
    ol.commentlist li .comment-entry{margin: -135px 0 0;border-bottom: 5px solid #eee;padding: 5px 150px 0;line-height: 2em;}

    so I changed it to 5px and there was much rejoicing!!!!!

    ol.commentlist li .comment-entry{margin: 5px 0 0;border-bottom: 5px solid #eee;padding: 5px 150px 0;line-height: 2em;}

  3. dczepiel
    Member
    Posted 4 years ago #

    another hint on this one - it was all messed up because I have switched off the avatars option in admin panel. With avatars everything was working well.

Topic Closed

This topic has been closed to new replies.

About this Topic