This file contains hidden or 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 | |
// Stop autolinks in comments | |
remove_filter('comment_text', 'make_clickable', 9); |
This file contains hidden or 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 | |
//Remove URL field from Comment Section | |
function remove_comment_url_fields($fields) { | |
if(isset($fields['url'])) | |
{ | |
unset($fields['url']); | |
} | |
return $fields; |
This file contains hidden or 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 | |
// Create a Portfolio Post Type | |
add_action( 'init', 'register_cpt_portfolio' ); | |
function register_cpt_portfolio() { | |
$labels = array( | |
'name' => _x( 'Portfolio', 'portfolio' ), |
This file contains hidden or 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 | |
// Create portfolio custom post type | |
add_action( 'init', 'register_cpt_portfolio' ); | |
function register_cpt_portfolio() { | |
register_post_type( 'portfolio', | |
array( | |
'labels' => array( |
This file contains hidden or 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
/* Column Classes | |
------------------------------------------------------------ */ | |
.five-sixths, | |
.four-fifths, | |
.four-sixths, | |
.one-fifth, | |
.one-fourth, | |
.one-half, | |
.one-sixth, |
This file contains hidden or 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
// Two Columns | |
<div class="one-half first">This is an example of a WordPress post, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many posts as you like in order to share with your readers what exactly is on your mind.</div> | |
<div class="one-half">This is an example of a WordPress post, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many posts as you like in order to share with your readers what exactly is on your mind.</div> | |
// Three Columns | |
<div class="one-third first">This is an example of a WordPress post, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many posts as you like in order to share with your readers what exactly is on your mind.</div> | |
<div class="one-third">This is an example of a WordPress post, you could edit this to put information about yourself or y |
This file contains hidden or 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 | |
// Modify the size of the Gravatar in the author box | |
add_filter( 'genesis_author_box_gravatar_size', 'afn_author_box_gravatar_size' ); | |
function afn_author_box_gravatar_size($size) { | |
return '80'; | |
} |
This file contains hidden or 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 | |
// Change Gravatar Image Size in Comment Section | |
function afn_comment_list_args( $args ) { | |
return array( 'type' => 'comment', 'avatar_size' => 80, 'callback' => 'genesis_comment_callback' ); | |
} | |
add_filter( 'genesis_comment_list_args', 'afn_comment_list_args' ); |
This file contains hidden or 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 | |
// Conditionally remove secondary menu | |
add_action('template_redirect', 'afn_conditional_actions'); | |
function afn_conditional_actions() { | |
if ( is_page( 10 ) ) { | |
remove_action('genesis_after_header', 'genesis_do_subnav'); | |
} |
This file contains hidden or 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 | |
function afn_more_buttons($buttons) { | |
$buttons[] = 'hr'; | |
return $buttons; | |
} | |
add_filter("mce_buttons", "afn_more_buttons"); |