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 jetpackme_more_related_posts( $options ) { | |
$options['size'] = 6; | |
return $options; | |
} | |
add_filter( 'jetpack_relatedposts_filter_options', 'jetpackme_more_related_posts' ); |
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 | |
//* Register Footer Menu in Genesis Framework (HTML5) | |
function afn_add_footer_menu () { | |
echo '<nav class="nav-footer" role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">'; | |
wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_id' => 'nav-footer' , 'menu_class' => 'menu genesis-nav-menu menu-footer', 'theme_location' => 'tertiary', 'depth' => '1' ) ); | |
echo '</nav>'; | |
} | |
add_action('genesis_before_footer', 'afn_add_footer_menu'); |
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 | |
// Set HTML Editor as default post editor | |
add_filter( 'wp_default_editor', create_function('', 'return "html";') ); |
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 | |
// Set Visual editor as default post editor | |
add_filter( 'wp_default_editor', create_function('', 'return "tinymce";') ); |
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 Reply link | |
function afn_custom_comment_reply($link) { | |
$link = str_replace('Reply', 'Reply to this comment', $link); | |
return $link; | |
} | |
add_filter('comment_reply_link', 'afn_custom_comment_reply'); |
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 | |
/** | |
* Retrieve the shortcode regular expression for searching. | |
* | |
* The regular expression combines the shortcode tags in the regular expression | |
* in a regex class. | |
* | |
* The regular expression contains 6 different sub matches to help with parsing. | |
* |
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 | |
//* Display custom tax in the entry footer (Genesis Framework - HTML5) | |
add_filter( 'genesis_post_meta', 'afn_display_custom_tax' ); | |
function afn_display_custom_tax($post_meta) { | |
$post_meta = '[post_terms taxonomy="type" before="Type: "]'; | |
return $post_meta; | |
} |
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 display custom tax in entry footer (Genesis Framework - HTML5) | |
function afn_display_conditionals() { | |
if ( is_singular( 'portfolio' ) || is_post_type_archive( 'portfolio' ) ) { | |
add_filter('genesis_post_meta', 'afn_display_custom_tax'); | |
} | |
} | |
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 | |
add_action( 'init', 'afn_register_taxonomy_types' ); | |
function afn_register_taxonomy_types() { | |
$labels = array( | |
'name' => _x( 'Types', 'types' ), | |
'singular_name' => _x( 'Type', 'types' ), | |
'search_items' => _x( 'Search Types', 'types' ), |
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 comment before and after notes | |
add_filter( 'comment_form_defaults', 'afn_custom_comment_form' ); | |
function afn_custom_comment_form($fields) { | |
$fields['comment_notes_before'] = ''; // Removes comment before notes | |
$fields['comment_notes_after'] = ''; // Removes comment after notes | |
return $fields; | |
} |