Footer displaying incorrectly
-
Hi Everyone
I’m having trouble with my footer, at https://www.arjunjassal.com.
There is big gap between the content and the footer.
The space is being taken up by ‘div class=post’. I know this is for the blog posts, but why is the space being taken up on pages where there are no posts?
Furthermore, I have defined in settings->reading that the posts on be displayed on the page called ‘blog’.
So, in sum, how can I get rid of this post div that taking up space and causing havoc with the formatting?
Please do let me know
Thanks in advance!
-
the space is also caused by the min-height of .post:
in style.css:
/* post */ .post { clear: both; padding: 0 0 0 107px; margin-top: 0px; margin-bottom: 30px; min-height: 100px; max-width: 650px; }
Thanks!
Removed the min height bit (made it 0px).
Thats helped.
But, if possible, I would want the footer to display a little higher still.
Any suggestions?for instance, there is:
20px margin-bottom on #content
#content { float: left; width: 980px; margin: 40px 0 20px; min-height: 200px; }
10px padding-top on #footer:
#footer { clear: both; background: url(https://lh6.ggpht.com/_nBKCIRP_D9Y/TMHWdJT0juI/AAAAAAAAAXY/6iJamdKnojg/s800/message.png) no-repeat center bottom; //border-top: double 4px #b09370; padding: 10px 0 100px; position: relative; width: 100%; overflow: hidden; font: .9em/1.4em Arial, Helvetica, sans-serif; color: #685138; }
30px margin-bottom on .post
.post { clear: both; padding: 0 0 0 107px; margin-top: 0px; margin-bottom: 30px; min-height: 0px; max-width: 650px; }
changing these values might effect the display of other pages.
Thanks Alchymyth!
These values completely escaped me, will be experimenting with them soon, to get the layout just right.Just one more thing though, no matter what I do, I’m completely unable to get the comments box show up under the posts. Have tried everything I know. Any idea on why its not showing up?
(it shows up on all pages, except the one with the posts on it).
Please have a look here: https://arjunjassal.com/?page_id=19
try to add:
<?php global $withcomments; $withcomments = true; ?>
before the line
<?php comments_template(); ?>
Thanks for that.
I cant seem to find the <?php comments_template(); ?> line anywhere in the PHP that came with the template (using koi, if that helps).
Did go through the comments file (php), this is what it looks like.<?php
// Do not delete these lines
if (!empty($_SERVER[‘SCRIPT_FILENAME’]) && ‘comments.php’ == basename($_SERVER[‘SCRIPT_FILENAME’]))
die (‘Please do not load this page directly. Thanks!’);if ( post_password_required() ) { ?>
<p class=”nocomments”>This post is password protected. Enter the password to view comments.</p>
<?php
return;
}
?><!– You can start editing here–>
<?php if ( have_comments() ) : ?>
<div class=”commentwrap”>
<h4 id=”comments” class=”comment-title”><?php comments_number(__(‘No Comments’,’themify’), __(‘One Comment’,’themify’), __(‘% Comments’,’themify’) );?></h4><div class=”next-prev-comment”>
<span class=”prev”><?php previous_comments_link(__(‘« Older Comments’,’themify’)) ?></span>
<span class=”next”><?php next_comments_link(__(‘Newer Comments »’,’themify’)) ?></span>
</div><ol class=”commentlist”>
<?php wp_list_comments(‘callback=custom_theme_comment’); ?></div><!–/commentwrap –>
<?php else : // this is displayed if there are no comments so far ?><?php if ( comments_open() ) : // if comment is open, but no comments yet ?>
<?php else : // comments are closed ?>
<?php endif; ?>
<?php endif; ?><?php if ( comments_open() ) : ?>
<div id=”respond”>
<h4 class=”comment-title”><?php comment_form_title( __(‘Leave a Reply’,’themify’), __(‘Leave a Reply to %s‘,’themify’) ); ?></h4>
<p class=”cancel-comment-reply”>
<?php cancel_comment_reply_link(__(‘Cancel’,’themify’)); ?>
</p><?php if ( get_option(‘comment_registration’) && !is_user_logged_in() ) : ?>
<p><?php _e(‘You must be’,’themify’); ?> “><?php _e(‘logged in’,’themify’); ?> <?php _e(‘to post a comment’,’themify’); ?>.</p>
<?php else : ?><form action=”<?php echo get_option(‘siteurl’); ?>/wp-comments-post.php” method=”post” id=”commentform”>
<?php if ( is_user_logged_in() ) : ?>
<p><?php _e(‘Logged in as’,’themify’); ?> /wp-admin/profile.php”><?php echo $user_identity; ?>. ” title=”<?php _e(‘Log out of this account’,’themify’); ?>”><?php _e(‘Log out’,’themify’); ?> »</p>
<?php else : ?>
<p><input type=”text” name=”author” id=”author” value=”<?php echo esc_attr($comment_author); ?>” size=”22″ tabindex=”1″ <?php if ($req) echo “aria-required=’true'”; ?> />
<label for=”author”><?php _e(‘Name’,’themify’);?> <small><?php if ($req) _e(‘(required)’,’themify’); ?></small></label></p><p><input type=”text” name=”email” id=”email” value=”<?php echo esc_attr($comment_author_email); ?>” size=”22″ tabindex=”2″ <?php if ($req) echo “aria-required=’true'”; ?> />
<label for=”email”>Mail <small><?php if ($req) _e(‘(required)’,’themify’); ?></small></label></p><p><input type=”text” name=”url” id=”url” value=”<?php echo esc_attr($comment_author_url); ?>” size=”22″ tabindex=”3″ />
<label for=”url”><?php _e(‘Website’,’themify’); ?></label></p><?php endif; ?>
<!–<p><small>XHTML: You can use these tags:
<?php echo allowed_tags(); ?>
</small></p>–><p><textarea name=”comment” id=”comment” cols=”58″ rows=”10″ tabindex=”4″></textarea></p>
<p><input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”<?php _e(‘Submit Comment’,’themify’); ?>” />
<?php comment_id_fields(); ?>
</p>
<?php do_action(‘comment_form’, $post->ID); ?></form>
<?php endif; // If registration required and not logged in ?>
</div><!–/respond –><?php endif; // if you delete this the sky will fall on your head ?>
Let me know if this has any clues in it!
Thanks a bunch!Thanks for that.
I cant seem to find the <?php comments_template(); ?> line anywhere in the PHP that came with the template (using koi, if that helps).
Did go through the comments file (php), this is what it looks like.<?php
// Do not delete these lines
if (!empty($_SERVER[‘SCRIPT_FILENAME’]) && ‘comments.php’ == basename($_SERVER[‘SCRIPT_FILENAME’]))
die (‘Please do not load this page directly. Thanks!’);if ( post_password_required() ) { ?>
<p class=”nocomments”>This post is password protected. Enter the password to view comments.</p>
<?php
return;
}
?><!– You can start editing here–>
<?php if ( have_comments() ) : ?>
<div class=”commentwrap”>
<h4 id=”comments” class=”comment-title”><?php comments_number(__(‘No Comments’,’themify’), __(‘One Comment’,’themify’), __(‘% Comments’,’themify’) );?></h4><div class=”next-prev-comment”>
<span class=”prev”><?php previous_comments_link(__(‘« Older Comments’,’themify’)) ?></span>
<span class=”next”><?php next_comments_link(__(‘Newer Comments »’,’themify’)) ?></span>
</div><ol class=”commentlist”>
<?php wp_list_comments(‘callback=custom_theme_comment’); ?></div><!–/commentwrap –>
<?php else : // this is displayed if there are no comments so far ?><?php if ( comments_open() ) : // if comment is open, but no comments yet ?>
<?php else : // comments are closed ?>
<?php endif; ?>
<?php endif; ?><?php if ( comments_open() ) : ?>
<div id=”respond”>
<h4 class=”comment-title”><?php comment_form_title( __(‘Leave a Reply’,’themify’), __(‘Leave a Reply to %s‘,’themify’) ); ?></h4>
<p class=”cancel-comment-reply”>
<?php cancel_comment_reply_link(__(‘Cancel’,’themify’)); ?>
</p><?php if ( get_option(‘comment_registration’) && !is_user_logged_in() ) : ?>
<p><?php _e(‘You must be’,’themify’); ?> “><?php _e(‘logged in’,’themify’); ?> <?php _e(‘to post a comment’,’themify’); ?>.</p>
<?php else : ?><form action=”<?php echo get_option(‘siteurl’); ?>/wp-comments-post.php” method=”post” id=”commentform”>
<?php if ( is_user_logged_in() ) : ?>
<p><?php _e(‘Logged in as’,’themify’); ?> /wp-admin/profile.php”><?php echo $user_identity; ?>. ” title=”<?php _e(‘Log out of this account’,’themify’); ?>”><?php _e(‘Log out’,’themify’); ?> »</p>
<?php else : ?>
<p><input type=”text” name=”author” id=”author” value=”<?php echo esc_attr($comment_author); ?>” size=”22″ tabindex=”1″ <?php if ($req) echo “aria-required=’true'”; ?> />
<label for=”author”><?php _e(‘Name’,’themify’);?> <small><?php if ($req) _e(‘(required)’,’themify’); ?></small></label></p><p><input type=”text” name=”email” id=”email” value=”<?php echo esc_attr($comment_author_email); ?>” size=”22″ tabindex=”2″ <?php if ($req) echo “aria-required=’true'”; ?> />
<label for=”email”>Mail <small><?php if ($req) _e(‘(required)’,’themify’); ?></small></label></p><p><input type=”text” name=”url” id=”url” value=”<?php echo esc_attr($comment_author_url); ?>” size=”22″ tabindex=”3″ />
<label for=”url”><?php _e(‘Website’,’themify’); ?></label></p><?php endif; ?>
<!–<p><small>XHTML: You can use these tags:
<?php echo allowed_tags(); ?>
</small></p>–><p><textarea name=”comment” id=”comment” cols=”58″ rows=”10″ tabindex=”4″></textarea></p>
<p><input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”<?php _e(‘Submit Comment’,’themify’); ?>” />
<?php comment_id_fields(); ?>
</p>
<?php do_action(‘comment_form’, $post->ID); ?></form>
<?php endif; // If registration required and not logged in ?>
</div><!–/respond –><?php endif; // if you delete this the sky will fall on your head ?>
Let me know if this has any clues in it!
Thanks a bunch!
- The topic ‘Footer displaying incorrectly’ is closed to new replies.