Skip to content

Instantly share code, notes, and snippets.

View Kaiderella's full-sized avatar
🏠
Working from home

Hieu Bui Trung Kaiderella

🏠
Working from home
View GitHub Profile
@Kaiderella
Kaiderella / gist:346a03cc7470a7133d5e
Last active June 3, 2022 02:14
Tùy biến nút Submit trong Genesis
//* Tùy biến nút Submit trong Genesis
add_filter( 'comment_form_defaults', 'sp_comment_submit_button' );
function sp_comment_submit_button( $defaults ) {
$defaults['label_submit'] = __( 'Đăng bình luận', 'custom' );
return $defaults;
}
@Kaiderella
Kaiderella / gist:aab96f48e6ef8d733aa7
Created December 29, 2014 09:49
Thêm nội quy vào khung bình luận trong Genesis
//* Thêm nội quy vào khung bình luận trong Genesis
add_action( 'genesis_after_comments', 'sp_comment_policy' );
function sp_comment_policy() {
if ( is_single() && !is_user_logged_in() && comments_open() ) {
?>
<div class="comment-policy-box">
<p class="comment-policy"><small><strong>Nội quy bình luận:</strong>Viết nội quy bình luận của bạn vào đây.</small></p>
</div>
<?php
}
@Kaiderella
Kaiderella / gist:31a402372f13bccb730e
Last active June 3, 2022 02:15
Loại bỏ các thẻ HTML được cho phép bên trên khung bình luận trong Genesis
//* Loại bỏ các thẻ HTML được cho phép bên trên khung bình luận trong Genesis
add_filter( 'comment_form_defaults', 'sp_remove_comment_form_allowed_tags' );
function sp_remove_comment_form_allowed_tags( $defaults ) {
$defaults['comment_notes_after'] = '';
return $defaults;
}
@Kaiderella
Kaiderella / gist:7ba78bf5aefa98aded3b
Created December 29, 2014 13:44
Chèn post views icon vào Wordpress
.post_view:before {
content: "\f177";
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 20px/1 'dashicons';
vertical-align: top;
}
@Kaiderella
Kaiderella / khung-nhap-du-lieu-tim-kiem
Created December 30, 2014 10:02
Tùy biến dòng chữ trong khung nhập dữ liệu tìm kiếm của Genesis
//* Tùy biến dòng chữ trong khung nhập dữ liệu tìm kiếm của Genesis
add_filter( 'genesis_search_text', 'sp_search_text' );
function sp_search_text( $text ) {
return esc_attr( 'Tìm kiếm trên blog của tôi...' );
}
@Kaiderella
Kaiderella / nut-tim-kiem
Created December 30, 2014 10:04
Tùy biến nút tìm kiếm trong Genesis
//* Tùy biến nút tìm kiếm trong Genesis
add_filter( 'genesis_search_button_text', 'sp_search_button_text' );
function sp_search_button_text( $text ) {
return esc_attr( 'Tìm kiếm' );
}
@Kaiderella
Kaiderella / nhan-khung-tim-kiem
Created December 30, 2014 10:13
Tùy biến nhãn của khung tìm kiếm trong Genesis
//* Tùy biến nhãn của khung tìm kiếm trong Genesis
add_filter( 'genesis_search_form_label', 'sp_search_form_label' );
function sp_search_form_label ( $text ) {
return esc_attr( 'Khung tìm kiếm' );
}
@Kaiderella
Kaiderella / remove-author-box
Created January 1, 2015 05:43
Loại bỏ Author Box ra khỏi bài viết trong Genesis
//* Loại bỏ Author Box ra khỏi bài viết trong Genesis XHTML Themes
remove_action( 'genesis_after_post', 'genesis_do_author_box_single' );
//* Loại bỏ Author Box ra khỏi bài viết trong Genesis HTML5 Themes
remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 );
@Kaiderella
Kaiderella / hien-thi-author-box
Created January 1, 2015 05:47
Kích hoạt Author Box trong Genesis
//* Kích hoạt Author Box trong Genesis
add_filter( 'get_the_author_genesis_author_box_single', '__return_true' );
@Kaiderella
Kaiderella / display-archive
Created January 1, 2015 05:54
Kích hoạt Author Box cho trang lưu trữ trong Genesis
//* Kích hoạt Author Box cho trang lưu trữ
add_filter( 'get_the_author_genesis_author_box_archive', '__return_true' );