This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Customize Entry Meta Filed Under and Tagged Under | |
add_filter( 'genesis_post_meta', 'ig_entry_meta_footer' ); | |
function ig_entry_meta_footer( $post_meta ) { | |
$post_meta = '[post_categories before=""] [post_tags before=""]'; | |
return $post_meta; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[post_categories before="Thể loại: "] [post_tags before="Tagged: "] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Đếm thời gian vài phút trước giống facebook cho genesis framework | |
add_filter( 'genesis_post_info', 'sp_post_info_filter' ); | |
function sp_post_info_filter($post_info) { | |
if ( !is_page() ) { | |
$post_info = '<i class="fa fa-clock-o"></i> [post_date format="relative" relative_depth="1"] <i class="fa fa-eye"></i> [postview] [post_comments zero="0 Comments" one="1 Comment" more="% Comments"]'; | |
return $post_info; | |
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[post_date format="relative" relative_depth="1"] By [post_author_posts_link] [post_comments zero="Comments" one="1 Comment" more="% Comments"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[post_date format="relative" relative_depth="1"] | |
By [post_author_posts_link] | |
[post_comments zero="Comments" one="1 Comment" more="% Comments"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Post Views on Post Info | |
add_filter( 'genesis_post_info', 'ja_add_post_view_to_info' ); | |
function ja_add_post_view_to_info($post_info) { | |
if ( !is_page() ) { | |
$post_info = '[post_date] by [post_author_posts_link] [post_comments] [postview] [post_edit]'; | |
return $post_info; | |
} | |
} | |
// Add Post Views on Post Meta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Primary Navigation menu item color styles - https://sampres.com | |
--------------------------------------------- */ | |
.nav-primary .redcolor a { background:#7F5217; } | |
.nav-primary .redcolor a:hover { background:#7F462C; } | |
.nav-primary .yellowcolor a { background:#FFFF00; } | |
.nav-primary .yellowcolor a:hover { background:#FFF380; } | |
.nav-primary .bluecolor a { background:#342D7E; } | |
.nav-primary .bluecolor a:hover { background:#15317E; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shortcodes in Widgets | |
add_filter('widget_text', 'do_shortcode'); | |
#Tạo shortcode genesis | |
function url_shortcode() { | |
return get_bloginfo('url'); | |
} | |
add_shortcode('url','url_shortcode'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Đếm số comment genesis | |
add_filter( 'genesis_title_comments', 'crunchify_title_comments'); | |
function crunchify_title_comments() { | |
return __(comments_number( '<h3>Comments</h3>', '<h3>1 Comments</h3>', '<h3>% Comments</h3>' ), 'genesis' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cswp_comment_count() { | |
global $wpdb; | |
$count = $wpdb->get_var('SELECT COUNT(comment_ID) FROM ' . $wpdb->comments. ' WHERE comment_author_email = "' . get_comment_author_email() . '"'); | |
return ''.$count.' bình luận'; | |
} | |
add_filter( 'comment_author_says_text', 'cswp_comment_count' ); |