View customize-entry-meta.php
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', 'sleek_pro_meta_footer' ); | |
function sleek_pro_meta_footer( $post_meta ) { | |
$post_meta = '[post_categories before=""] [post_tags before=""]'; | |
return $post_meta; | |
} |
View edit-post-info.php
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 the Post Info Conditionally on Home Page and Single Post in Genesis Sample Theme | |
add_filter( 'genesis_post_info', 'post_info_filter' ); | |
function post_info_filter( $post_info ) { | |
if ( is_front_page() || is_archive() ) : | |
$post_info = '[post_date] [post_comments zero="0 Comments" one="1 Comment" more="% Comments"]'; | |
return $post_info; |
View relative-date.php
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
// Apply Relative Date Lengths in Genesis | |
// (credit: http://www.billerickson.net/genesis-relative-date-length/) | |
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; | |
}} |
View post-views.php
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 Genesis Framework | Credit: http://www.joemaraparecio.com/how-to-add-post-views-in-genesis/ | |
// Set Post Views :It counts everytime single posts is viewed | |
if ( !function_exists( 'ja_setPostViews' ) ){ | |
function ja_setPostViews( $postID ){ | |
$count_key = 'ja_post_views'; | |
$count = get_post_meta($postID, $count_key, true); | |
if( $count == '' ){ | |
$count = 0; |
View post-word-count.php
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
// Display Post Word Count in Genesis | |
// Note: Special Thanks to Victor Front: Ref: https://www.facebook.com/groups/genesiswp/permalink/1536463436404848/ | |
// And Sridhar: https://sridharkatakam.com/display-word-count-posts-genesis/ | |
// Print Post Word Count and Create a Shortcode | |
add_shortcode( 'word-count', 'post_word_count' ); | |
function post_word_count() { | |
return sprintf( __( '%s Words', 'leaguewp' ), str_word_count( strip_tags( get_post_field( 'post_content', get_the_ID() ) ), 0 ) ); | |
} |
View trackbacks-headlines.php
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
//* Modify trackbacks title in comments | |
add_filter( 'genesis_title_pings', 'topleague_title_pings' ); | |
function topleague_title_pings() { | |
echo '<h3>Trackbacks</h3>'; | |
} |
View comment-policy.php
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 a comment policy box in comments | |
add_action( 'genesis_after_comments', 'topleague_comment_policy' ); | |
function topleague_comment_policy() { | |
if ( is_single() && !is_user_logged_in() && comments_open() ) { | |
?> | |
<div class="comment-policy-box"> | |
<p class="comment-policy"><small><strong>Comment Policy:</strong>Zero tolerance for spammy comments.</small></p> | |
</div> | |
<?php | |
} |
View leave-a-reply.php
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
//* Modify the 'Leave a Reply' title in comments | |
add_filter( 'comment_form_defaults', 'topleague_comment_form_defaults' ); | |
function topleague_comment_form_defaults( $defaults ) { | |
$defaults['title_reply'] = __( 'Share Your Thoughts' ); | |
return $defaults; | |
} |
OlderNewer