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 / tuy-chinh-tieu-de-author-box
Created January 1, 2015 05:56
Tùy chỉnh tiêu đề cho Author Box trong Genesis
//* Tùy chỉnh tiêu đề cho Author Box trong Genesis
add_filter( 'genesis_author_box_title', 'custom_author_box_title' );
function custom_author_box_title() {
return '<strong>Thông tin tác giả</strong>';
}
@Kaiderella
Kaiderella / tuy-chinh-kich-thuoc-gravatar
Created January 1, 2015 05:59
Tùy chỉnh kích thước Gravatar trong Author Box
//* Tùy chỉnh kích thước Gravatar trong Author Box
add_filter( 'genesis_author_box_gravatar_size', 'author_box_gravatar_size' );
function author_box_gravatar_size( $size ) {
return '80';
}
@Kaiderella
Kaiderella / tuy-bien-giao-dien-author-box
Created January 1, 2015 06:03
Tùy biến giao diện Author Box trong Genesis
/* Author Box
------------------------------------------------------------ */
.author-box {
background-color: #f5f5f5;
border: 1px solid #ddd;
margin: 0 0 40px;
overflow: hidden;
padding: 10px;
}
@Kaiderella
Kaiderella / an-sidebar-trong-genesis
Created January 2, 2015 07:09
Ẩn sidebar trong Genesis khi ở giao diện mobile
//* Ẩn sidebar trong Genesis khi ở giao diện mobile
add_action( 'get_header', 'remove_sidebars_mobile' );
function remove_sidebars_mobile() {
if ( wp_is_mobile() ) {
# Force full width content
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
}
}
@Kaiderella
Kaiderella / dat-lai-vi-tri-footer
Created January 2, 2015 08:33
Đặt lại vị trí footer trong Genesis
@Kaiderella
Kaiderella / tuy-bien-return-to-top
Created January 2, 2015 08:35
Tùy biến nút Return to Top trong Genesis
//* Tùy biến nút Return to Top trong Genesis
add_filter( 'genesis_footer_backtotop_text', 'sp_footer_backtotop_text' );
function sp_footer_backtotop_text($backtotop) {
$backtotop = '[footer_backtotop text="Return to Top"]';
return $backtotop;
}
@Kaiderella
Kaiderella / tuy-bien-credits-text-1
Created January 2, 2015 08:38
Tùy biến Credits text trong Genesis 1
//* Tùy biến Credits text trong Genesis 1
add_filter( 'genesis_footer_creds_text', 'sp_footer_creds_text' );
function sp_footer_creds_text() {
echo '<div class="creds"><p>';
echo 'Copyright &copy; ';
echo date('Y');
echo ' &middot; <a href="http://mydomain.com">My Custom Link</a> &middot; Built on the <a href="http://www.studiopress.com/themes/genesis" title="Genesis Framework">Genesis Framework</a>';
echo '</p></div>';
}
@Kaiderella
Kaiderella / tuy-bien-footer-text
Created January 2, 2015 08:41
Tùy biến Footer text trong Genesis
@Kaiderella
Kaiderella / tuy-bien-toan-bo-footer
Created January 2, 2015 08:46
Tùy biến toàn bộ nội dung Footer trong Genesis
@Kaiderella
Kaiderella / tuy-bien-next-page
Created January 4, 2015 08:49
Tùy biến nút Next Page trong Genesis
//* Tùy biến nút Next Page trong Genesis
add_filter ( 'genesis_next_link_text' , 'sp_next_page_link' );
function sp_next_page_link ( $text ) {
return 'Trang sau &#x000BB;';
}