help me fix my wordpress comment code...

8 replies
  • WEB DESIGN
  • |
I posted this in programming section, but didn't get any help. That's why I am posting here. Here is one of my blog post, where the problem can be noticed.

Online Income Startup

The problem is that those that the url of commentors goes to something called "Author site", instead of the name. I want the url to be linked to the name of the commentor.

Also I also want the twitter link to show up under the name, just like it's showing up in all my comment replies. All of this is working fine in my reply to comments. You can see that my name is linked to my website and also the twitter link is visible.

Please help me fix the problem.

Thanks
Dr.Spencer Jones
#code #comment #comments #fix #wordpress
  • Profile picture of the author SirKonstantine
    Post your comments.php file here. Make sure it is [quote] or else it'll be garbage.
    {{ DiscussionBoard.errors[6461484].message }}
    • Profile picture of the author Spencer Jones
      [quote=SirKonstantine;6461484]Post your comments.php file here. Make sure it is
      or else it'll be garbage.
      Below is my comment file code... Thank you...

      <?php
      /**
      * @desc comments template
      */

      if ( post_password_required() ) : ?>
      <p><?php _e('Enter your password to view comments.'); ?></p>
      <?php return; endif; ?>

      <?php if ( have_comments() ) : ?>
      <p id="postcomment" class="postcomment"><?php comments_number('0', '1', '%' );?> Comments</p>
      <ul id="commentlist" class="commentlist">

      <?php foreach ( as ) : ?>
      <li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>">
      <div class="author_avatar"><?php echo get_avatar( , 50 ); ?></div>
      <p class="postcomment">From <?php comment_author() ?></p>
      <?php comment_text() ?>
      <div class="commentdate_div"><p class="commentdate"><?php comment_author_url_link("Author's Site", ' &bull; ', ' &bull; '); ?><?php the_time('jS F Y') ?><a href="#comment-<?php comment_ID() ?>"></a><?php edit_comment_link(__(" Edit This"), ' |'); ?></p></div>
      </li>

      <?php endforeach; ?>

      </uls>

      <?php else : // If there are no comments yet ?>
      <p><?php _e('No comments yet.'); ?></p>
      <?php endif; ?>



      <?php if ( comments_open() ) : ?>
      <p id="postcomment" class="postcomment"><?php _e('Leave a Reply'); ?></p>

      <?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
      <p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.'), wp_login_url( get_permalink() ) );?></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 class="user-in"><?php printf(__('Logged in as %s.'), '<a href="'.get_option('siteurl').'/wp-admin/profile.php">'..'</a>'); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account') ?>"><?php _e('Log out &raquo;'); ?></a></p>

      <?php else : ?>

      <p><input type="text" name="author" id="author" value="<?php echo esc_attr(); ?>" size="22" tabindex="1" />
      <label for="author"><small><?php _e('Name'); ?> <?php if () _e('(required)'); ?></small></label></p>

      <p><input type="text" name="email" id="email" value="<?php echo esc_attr(); ?>" size="22" tabindex="2" />
      <label for="email"><small><?php _e('Mail (will not be published)');?> <?php if () _e('(required)'); ?></small></label></p>

      <p><input type="text" name="url" id="url" value="<?php echo esc_attr(); ?>" size="22" tabindex="3" />
      <label for="url"><small><?php _e('Website'); ?></small></label></p>

      <?php endif; ?>

      <p><textarea name="comment" id="comment" cols="50%" rows="10" tabindex="4"></textarea></p>
      <!--<p><small><strong>XHTML:</strong> <?php printf(__('You can use these tags: %s'), allowed_tags()); ?></small></p>-->
      <p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php esc_attr_e('Submit Comment'); ?>" />
      <input type="hidden" name="comment_post_ID" value="<?php echo ; ?>" />
      </p>
      <?php do_action('comment_form', ); ?>

      </form>

      <?php endif; // If registration required and not logged in ?>

      <?php else : // Comments are closed ?>
      <p><?php _e('Sorry, the comment form is closed at this time.'); ?></p>
      <?php endif; ?>
      {{ DiscussionBoard.errors[6461659].message }}
  • Profile picture of the author xtrapunch
    Customizing a comment output requires changes in the function that manages comment output, which is generally present in the functions.php. You need to know PHP and WORDPRESS to be able to make the necessary changes.

    ADD: You are using CommentLuv. You need to modify the comment display. You should be able to find the help at their site.
    Signature
    >> Web Design, Wordpress & SEO - XtraPunch.com <<
    Web Design & SEO Agency | Serving World Wide from New Delhi, India

    {{ DiscussionBoard.errors[6462151].message }}
  • Profile picture of the author Spencer Jones
    Originally Posted by truonglychoi View Post

    anyone knows her help with travel are also encountered this
    What do you mean ? I don't understand...
    {{ DiscussionBoard.errors[6462152].message }}
  • Profile picture of the author xtrapunch
    One needs access to the theme to be able to find the solution.
    Signature
    >> Web Design, Wordpress & SEO - XtraPunch.com <<
    Web Design & SEO Agency | Serving World Wide from New Delhi, India

    {{ DiscussionBoard.errors[6462273].message }}
    • Profile picture of the author Spencer Jones
      Originally Posted by xtrapunch View Post

      One needs access to the theme to be able to find the solution. By the way, I checked the site in your signature. If you made "$11,187 in 7 days", you should consider paying a few dollars to an expert who has spent a lot of time gaining knowledge of PHP & WP. Just a thought.
      Xtrapunch Wordpress expert, Not all warriors reply this section with money in mind. Previously I've received wonderful support here, for my wordpress theme from real expert who know what they are talking about. And that's why I returned to this section for help.

      Eventhough I am not a php expert, I believe there is no need to access the entire theme files. How I know ? I tried changing the entire comment code with comment code from another theme and I was able to make the entire comment section look like the other blog's comment area, but it wasn't just what I wanted. I just wanted to make the name link appear. That's all. Regarding paying for the job, I am here because I couldn't get a reply from my web developer who did the theme for me and even if I can get him to do the job, he doesn't accept payment for little changes. Moreover, I believe I can make the changes myself, if I am guided in the right direction.

      P.S: I am expecting reply from someone who knows the stuff.
      {{ DiscussionBoard.errors[6462380].message }}
  • Profile picture of the author xtrapunch
    You got me all wrong. I don't need any money from you. I keep helping people using my free themes without any monetary compensation. I would have been posting a solution right now if you would have given me your theme templates or the relevant codes. If you look at this forum, I try to help on as many threads as possible. If you want to make the changes yourself, you can read the WordPress Codex or, as I have already said, check the Comment Luv help section (if they have any). The comment output is generally managed by some function in the functions.php. You need to work on that function/code.

    PS: I have deleted the portion of my comment that you found offending. I take my words back. I didn't intend to offend you. And, I am not a self-proclaimed WordPress expert. I have several themes on WordPress.com & WordPress.org, and I have written WordPress tutorials for the top-most blogs. So I might have been able to provide you the solution.
    Signature
    >> Web Design, Wordpress & SEO - XtraPunch.com <<
    Web Design & SEO Agency | Serving World Wide from New Delhi, India

    {{ DiscussionBoard.errors[6462749].message }}

Trending Topics