Use specific language for comment section

On the bottom of comments.php I use the following code: <?php comment_form(array(‘comment_field’ => ‘<p class=”comment-form-comment”><label for=”comment”>Comment</label><textarea id=”comment” name=”comment” cols=”45″ rows=”8″ aria-required=”true”></textarea></p>’, ‘comment_notes_before’ => ‘<p class=”comment-notes”>Your email address will not be published. Required fields are marked *</p>’, ‘comment_notes_after’ => ”, ‘title_reply’ => ‘Leave a Reply’, ‘title_reply_to’ => ‘Leave a Reply to %s’, ‘label_submit’ => ‘Post comment’, … Read more

same comment list for two posts

You could use get_comments() instead. The code in this forum post gives an example of how you’d do that: <?php $recent_comments = get_comments( array(‘post_id’ => $newest_post_id,) ); foreach ($recent_comments as $comment) { ?> <?php $comment_id = get_comment($comment->comment_ID); $author = $comment_id->comment_author; $commentdate = $comment_id->comment_date; $content = $comment_id->comment_content; ?> <p><?php echo $author; echo $commentdate;?></p> <p><?php echo $content;?></p> … Read more

Translate placeholder text in search field

Just as any regular string, you can use <?php esc_attr_e( ‘Your Search term here’, ‘your_theme_slug’ ); ?> So your code for the <input> would look like <input type=”search” class=”search-field” placeholder=”<?php esc_attr_e( ‘Your Search term here’, ‘your_theme_slug’ ); ?>” value=”<?php echo esc_attr( $search ); ?>” name=”s”> WPML, as well as WordPress, uses the PHP get_text() function. … Read more