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
li.custom-list { | |
padding-right: 0; | |
margin-left: 0; | |
list-style-type: none; | |
counter-increment: step-counter; | |
padding-bottom: 15px; | |
margin-top: 15px; | |
margin-bottom: 15px; | |
display: flex; | |
} |
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 lượt xem trong genesis framework | |
function getPostViews($postID){ | |
$count_key = 'post_views_count'; | |
$count = get_post_meta($postID, $count_key, true); | |
if($count==''){ | |
delete_post_meta($postID, $count_key); | |
add_post_meta($postID, $count_key, '0'); | |
return "0 Views"; | |
} | |
return $count.' Views'; |
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
# Chèn đoạn shortcode bên dưới vào plugin Genesis Simle edit | |
[post_views] |
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
// Register front-page widget areas | |
for ( $i = 1; $i <= 5; $i++ ) { | |
genesis_register_widget_area( | |
array( | |
'id' => "front-page-{$i}", | |
'name' => __( "Front Page {$i}", 'my-theme-text-domain' ), | |
'description' => __( "This is the front page {$i} section.", 'my-theme-text-domain' ), | |
) | |
); | |
} |
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
<?php | |
// Enqueue styles | |
wp_enqueue_style( 'front-styles', get_stylesheet_directory_uri() . '/style-front.css', array(), CHILD_THEME_VERSION ); | |
/** | |
* Add attributes for site-inner element, since we're removing 'content'. | |
* | |
* @param array $attributes Existing attributes. | |
* @return array Amended attributes. |
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
.site-inner.full { | |
padding: 0; | |
max-width: none; | |
} | |
.front-page-section { | |
padding: 150px 0; | |
} | |
.front-page-section:nth-child(odd) { |
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
//* Grid Style Content Archive | |
function be_archive_post_class( $classes ) { | |
// Don't run on single posts or pages | |
if( !is_home() ) | |
return $classes; | |
$classes[] = 'one-half'; | |
global $wp_query; | |
if( 0 == $wp_query->current_post || 0 == $wp_query->current_post % 2 ) | |
$classes[] = 'first'; | |
return $classes; |
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
<a title="Nhận ưu đãi lên đến 40% khi mua hosting tốc độ cao tại Hawk Host" href="#"> | |
<img src="http://sampres.com/wp-content/uploads/2017/07/hawk-host-off-sale.jpg" alt="banner" /> | |
</a> |
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
<a href="http://Twitter.com" target="_blank" rel="noopener">Twitter</a> | |
<a href="http://facebook.com" target="_blank" rel="noopener">Facebook</a> | |
<a href="http://plus.google.com" target="_blank" rel="noopener">Google+</a> | |
<a href="http://Pinterest.com" target="_blank" rel="noopener">Pinterest</a> | |
<a href="http://YouTube.com" target="_blank" rel="noopener">YouTube</a> |
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
//* Xóa Entry Meta Filed Under and Tagged Under trong genesis | |
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; | |
} |