1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Quick Wordpress help

Discussion in 'HTML & Website Design' started by Daniel591992, Mar 9, 2007.

  1. #1
    Hello, comments on my blog are all messed up.

    Here is a test:
    http://dodesign.fh-net.com/thewriterblog/?p=7

    When I try posting it takes me to ( http://dodesign.fh-net.com/thewriterblog/wp-comments-post.php ) and says "Error: please type a comment."

    Here is the code from comments.php

    <?php // Do not delete these lines
    	if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    		die ('Please do not load this page directly. Thanks!');
    
            if (!empty($post->post_password)) { // if there's a password
                if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) {  // and it doesn't match the cookie
    				?>
    				
    				<p class="nocomments"><?php _e("This post is password protected. Enter the password to view comments."); ?><p>
    				
    				<?php
    				return;
                }
            }
    
    ?>
    
    
    
    <?php if ($comments) : ?>
    
    
    <a name="comments" id="comments"></a>
    	<h3 id="posttitle"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to “<?php the_title(); ?>”</h3> 
    
    <div class="post">
    	<ol class="commentlist">
    
    <?php foreach ($comments as $comment) : ?>
    
    
    		<li id="comment-<?php comment_ID() ?>">
    			<p class="commentmetadata"><img src="images/comment.png" height="16" width="16" alt=""  /><span class="commentname"><?php comment_author_link() ?> wrote:</span></p>
    			<?php comment_text() ?>	
    		</li>
    
    <?php endforeach; ?>
    
    
    	</ol>
    	
    <?php endif; ?>
    
    <?php if ( comments_open() ) : ?>
    
    <h3 class="posttitle">Leave a comment</h3>
    
    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    <p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
    <?php else : ?>
    
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    
    
    <?php if ( $user_ID ) : ?>
    
    <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>">Logout &raquo;</a></p>
     
    <?php else : ?>
    
    <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
    <label for="author"><small>Name <?php if ($req) _e('(required)'); ?></small></label></p>
     
    <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
    <label for="email"><small>Mail (will not be published) <?php if ($req) _e('(required)'); ?></small></label></p>
     
    <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    <label for="url"><small>Website</small></label></p>
     
    <?php endif; ?>
     
    <p><textarea id="comment" rows="10" tabindex="4"></textarea></p>
     
    <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
    <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    </p>
    <?php do_action('comment_form', $post->ID); ?>
    
    </form>
    
    <?php endif; endif; ?>
    </p>
    </form>
    
    Code (markup):



    One more thing I noticed is that on the home page (http://dodesign.fh-net.com/thewriterblog/index.php) the dates only show up for the first post. The post part of index.php is:

    <div class="post">
    	<h3 class="posttitle"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a><span class="postdate"><?php the_date('F j, Y'); ?></span></h3>
    	<?php the_content(); ?>
    	<p class="postinfo"><img src="images/tag_green.png" height="16" width="16" alt="" />Posted in <?php the_category(', '); ?> by <?php the_author(); ?> | <img src="images/comment.png" height="16" width="16" alt="" /><a href="<?php the_permalink() ?>#comments"><?php comments_number('No comment', '1 comment', '% comments'); ?></a></p>
    </div>
    
    Code (markup):
     
    Daniel591992, Mar 9, 2007 IP
  2. Richie_Ni

    Richie_Ni Illustrious Member

    Messages:
    10,721
    Likes Received:
    1,175
    Best Answers:
    0
    Trophy Points:
    410
    #2
    Does that work in other themes?
     
    Richie_Ni, Mar 9, 2007 IP
  3. Daniel591992

    Daniel591992 Well-Known Member

    Messages:
    594
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    125
    #3
    I have no clue. I'm making the theme myself.

    that's why im running into problems, lol.
     
    Daniel591992, Mar 9, 2007 IP
  4. Daniel591992

    Daniel591992 Well-Known Member

    Messages:
    594
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    125
    #4
    Okay, the comments are working now (all I had to do was add name"comments" to <textarea>. How about the second problem:


    One more thing I noticed is that on the home page (http://dodesign.fh-net.com/thewriterblog/index.php) the dates only show up for the first post. The post part of index.php is:

    
    
    <div class="post">
    	<h3 class="posttitle"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a><span class="postdate"><?php the_date('F j, Y'); ?></span></h3>
    	<?php the_content(); ?>
    	<p class="postinfo"><img src="images/tag_green.png" height="16" width="16" alt="" />Posted in <?php the_category(', '); ?> by <?php the_author(); ?> | <img src="images/comment.png" height="16" width="16" alt="" /><a href="<?php the_permalink() ?>#comments"><?php comments_number('No comment', '1 comment', '% comments'); ?></a></p>
    </div>
    
    Code (markup):
    Anyone know
     
    Daniel591992, Mar 10, 2007 IP