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:96889a085f89da334f04
Created December 15, 2014 02:30
Xóa bỏ Genesis child info
//* Remove the entry header
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
@Kaiderella
Kaiderella / gist:017b168f632f4e5537c1
Created December 15, 2014 02:35
Tùy biến Genesis post meta
//* Customize the entry meta in the entry footer
add_filter( 'genesis_post_meta', 'post_meta_filter' );
function post_meta_filter( $post_meta ) {
$post_meta = 'Posted on [post_date] by [post_author_posts_link] under [post_categories before=""] with tag [post_tags before=""][post_edit]';
return $post_meta;
}
@Kaiderella
Kaiderella / gist:4029960d19d3372292bc
Created December 25, 2014 03:18
Link the stylesheet
<link rel="stylesheet" href="css/dashicons.css">
@Kaiderella
Kaiderella / gist:d1851bdd986ea86ff00a
Created December 25, 2014 03:25
Thêm dashicons icons
.myicon:before {
content: "\f155";
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 20px/1 'dashicons';
vertical-align: top;
}
@Kaiderella
Kaiderella / gist:edc1aab2055c3b4aaa60
Created December 29, 2014 09:28
Tùy biến comments link trong Genesis
//* Tùy biến comments link trong Genesis
add_filter( 'genesis_post_info', 'sp_post_info_filter' );
function sp_post_info_filter( $post_info ) {
return '[post_comments zero="Để lại một bình luận" one="1 Bình luận" more="% Bình luận"]';
}
@Kaiderella
Kaiderella / gist:5809b535d118bd2fcfda
Created December 29, 2014 09:31
Tùy biến Comments title text:
//* Tùy biến comments title text trong Genesis
add_filter( 'genesis_title_comments', 'sp_genesis_title_comments' );
function sp_genesis_title_comments() {
$title = '<h3>Bình luận</h3>';
return $title;
}
@Kaiderella
Kaiderella / gist:c8e1d754b94018a83377
Created December 29, 2014 09:33
Tùy biến Trackbacks title text trong Genesis
//* Tùy biến trackbacks title trong Genesis
add_filter( 'genesis_title_pings', 'sp_title_pings' );
function sp_title_pings() {
echo '<h3>Trackbacks</h3>';
}
@Kaiderella
Kaiderella / gist:d6ee88b45dac38cbe3f7
Created December 29, 2014 09:39
Tùy biến author says text trong Genesis
//* Tùy biến author says text trong Genesis
add_filter( 'comment_author_says_text', 'sp_comment_author_says_text' );
function sp_comment_author_says_text() {
return 'author says';
}
@Kaiderella
Kaiderella / gist:e058b9ebe6e2edf433ca
Created December 29, 2014 09:42
Tùy biến kích thước của Gravatar trong Genesis
//* Tùy biến kích thước của Gravatar trong Genesis
add_filter( 'genesis_comment_list_args', 'sp_comments_gravatar' );
function sp_comments_gravatar( $args ) {
$args['avatar_size'] = 96;
return $args;
}
@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
}