• i want to change my comment form to something like this ( IMAGE ) , so i need to get the ( name, url and email ) to be front of each of box .

    i tried to modify it using ( comment_form () ) but still errors , something like :

    Notice: Undefined variable: aria_req in C:\xampp\htdocs\word\wp-content\themes\3thoob\comments.php on line 57

    and this is my comment.php :

    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter dagash

    (@dagash)

    sorry here is the code of comment.php
    http://pastebin.com/kGyi6C6b

    You could use pure CSS to re-position the input labels. Or you could create a custom comment form: http://codex.wordpress.org/Function_Reference/comment_form

    Thread Starter dagash

    (@dagash)

    i want to remove the texts ( name , url and email ) … how can i pass it with by using this function ….?

    i use it like this :

    <?php comment_form(
    array(
    array(
                    'author' => ' ...',
    ?>

    but still somthing error with : $req …???

    Based on the $fields example in http://codex.wordpress.org/Function_Reference/comment_form try:

    <?php
    $fields =  array(
    	'author' => '<p class="comment-form-author">'  . ( $req ? '<span class="required">*</span>'  '' ) .  '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /> <label for="author">' . __( 'Name' ) . '</label> '</p>',
    	'email'  => '<p class="comment-form-email"> . ( $req ? '<span class="required">*</span>' '' ) . '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /><label for="email">' . __( 'Email' ) . '</label> '</p>',
    	'url'    => '<p class="comment-form-url"><input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /><label for="url">' . __( 'Website' ) . '</label></p>',
    ); ?>
    Thread Starter dagash

    (@dagash)

    ill try then ill be back ..
    thanks a lot

    Thread Starter dagash

    (@dagash)

    is it need any filters …??
    and , where i should add this …?? comments.php or functions.php

    Thread Starter dagash

    (@dagash)

    <?php $comment_args = array(
    	'fields' => apply_filters( 'comment_form_default_fields', array(
    
    	'author' => '<p class="comment-form-author">'  . ( $req ? '<span class="required">*</span>'  '' ) .  '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /> <label for="author">' . __( 'Name' ) . '</label> '</p>',
    	'email'  => '<p class="comment-form-email"> . ( $req ? '<span class="required">*</span>' '' ) . '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /><label for="email">' . __( 'Email' ) . '</label> '</p>',
    	'url'    => '<p class="comment-form-url"><input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /><label for="url">' . __( 'Website' ) . '</label></p>' ) ), 
    
    	'logged_in_as'        		 => '<p class="logged-in-as">' . sprintf( __( 'أنت مسجل باسم  <a href="%1$s">%2$s</a>. <a href="%3$s" title="">خروج</a>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
    	'comment_notes_after'	 => '',
    	'comment_field'      		 => '<p class="comment-form-comment"><label for="comment">'. '</label><textarea id="comment" name="comment"  aria-required="true"></textarea></p>'
    
    );
    ?>
    <?php comment_form($comment_args);?>
    ?>

    i try to using this in comments.php , but still somthing wrong..

    What is still wrong?

    Thread Starter dagash

    (@dagash)

    arse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\xampp\htdocs\word\wp-content\themes\3thoob\comments.php on line 56

    also , this is my comments.php file , can u look it then tell me the wrong …?
    http://pastebin.com/CDY26Rzw

    And what is in lines 54 – 57?

    Thread Starter dagash

    (@dagash)

    'fields' => apply_filters( 'comment_form_default_fields', array(
    
            'author' => '<p class="comment-form-author">'  . ( $req ? '<span class="required">*</span>'  '' ) .  '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /> <label for="author">' . __( 'Name' ) . '</label> '</p>',
            'email'  => '<p class="comment-form-email"> . ( $req ? '<span class="required">*</span>' '' ) .

    that is on it …

    There’s a a colon missing on line 56:

    'fields' => apply_filters( 'comment_form_default_fields', array(
                'author' => '<p class="comment-form-author">'  . ( $req ? '<span class="required">*</span>' : '' ) .  '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /> <label for="author">' . __( 'Name' ) . '</label> '</p>',
                'email'  => '<p class="comment-form-email"> . ( $req ? '<span class="required">*</span>' '' ) .

    Thread Starter dagash

    (@dagash)

    Parse error: syntax error, unexpected '/' in C:\xampp\htdocs\word\wp-content\themes\3thoob\comments.php on line 55

    I can’t see anything obviously wrong with the code I posted above.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘i need to get the ( name, url and email ) to be front of each of box’ is closed to new replies.