Full HD Add Karen apne wordpress theme me comment function

HD Video of Add Karen apne wordpress theme me comment function on e akhabaar

यदि आप अपने वॉर्डप्रेसस के कस्टम थीम मे कमेन्ट बॉक्स या कमेन्ट function लगाना चाहते है तो आप नीचे दिए हुए निम्न चरणों का पालन करते जाइए

1- function.php


पहले तो आप function.php मे

/Change the comment reply link to use 'Reply to '
*/
function add_comment_author_to_reply_link($link, $args, $comment)

$comment = get_comment( $comment );

// If no comment author is blank, use 'Anonymous'
if ( empty($comment->comment_author) ) 
if (!empty($comment->user_id))
$user=get_userdata($comment->user_id);
$author=$user->user_login;
 else 
$author = __('Anonymous');

 else 
$author = $comment->comment_author;


// If the user provided more than a first name, use only first name
if(strpos($author, ' '))
$author = substr($author, 0, strpos($author, ' '));


// Replace Reply Link with "Reply to "
$reply_link_text = $args['reply_text'];
$link = str_replace($reply_link_text, 'Reply to ' . $author, $link);

return $link;

add_filter('comment_reply_link', 'add_comment_author_to_reply_link', 10, 3);

कोड पेस्ट कर दें ।

2- अब comments.php


अब आप comments.php फाइल बना कर नीचे दिए कोड को पेस्ट करें


    100, 'style' => 'ol', 'short_ping' => true, 'reply_text' => __( 'Reply', 'nd_dosth' ), ) ); ?>
'' . __( 'Previous', 'nd_dosth' ) . '', 'next_text' => '' . __( 'Next', 'nd_dosth' ) . '', ) ); endif; // Check for have_comments(). // If comments are closed and there are comments, let's leave a little note, shall we? if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>

3 – style.css

अब आप नीचे दिए कोड को पेस्ट करें

#respond h3, .comments-title


color:black;


padding: 20px;


font-size: 20px;


border-top:1px solid #000;


border-bottom:1px solid #000;


margin: 30px 0;





#commentform .comment-notes


margin-bottom: 20px;





#commentform label


display:block;





#commentform input[type=”text”],


#commentform input[type=”url”],


#commentform input[type=”email”],


#commentform textarea


border: 1px solid #ccc;


border-radius: 4px;


margin-bottom: 20px;


width: 100%;


background-color: #f8f8f8;


padding: 7px 10px;


font-size: 18px;





#commentform input[type=”submit”]


line-height: 38px;


border-radius: 4px;


padding: 0 20px;


background-color: #fdb813;


color: black;


font-weight: bold;


font-size: 16px;


border:0;


position: relative;


transition:all 0.4s;


cursor:pointer;





#commentform input[type=”submit”]:hover


background-color: #6e551a;


color: white;





.comment-body .comment-author


float:left;


width: 30%;





.comment-body .comment-author .fn


display:block;


margin-top: 10px;





.comment-body


overflow:hidden;


margin-bottom: 30px;





.comment


margin-bottom: 30px;





.comment-list, .children


margin:0;


padding:0;


list-style-type: none;





.comment-list > li:first-child


border-top:0;


padding-top:0;





.comment


border-top:1px solid #ccc;


padding-top: 30px;


position:relative;





.children .comment


border-top:0;





.comment .children


border-top:1px dotted #5e666b;


border-left:1px dotted #5e666b;


padding-top: 10px;


padding-left: 10px;





.children


margin-left: 100px;





.children img


max-width: 75px;


height:auto;





.children .fn


font-size: 12px;





.says


display:none;





.comment-metadata


margin-left: 30%;





.comment-metadata a


color:#5e666b;


font-size: 14px;


margin-bottom: 10px;


display:block;





.comment-reply-link


position:absolute;


top: 15px;


right:0;


font-size: 12px;


color:#1a3794;

इस तरह से आप कमेन्ट बॉक्स लगा सकते है ।

Give your review about Add Karen apne wordpress theme me comment function in Comments below