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
// Change the "Enter title here" to "Enter book title here" for Books | |
add_filter('gettext', 'book_custom_rewrites', 10, 4); | |
function book_custom_rewrites($translation, $text, $domain) { | |
global $post; | |
if ( ! isset( $post->post_type ) ) { | |
return $translation; | |
} | |
$translations = &get_translations_for_domain($domain); | |
$translation_array = 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
// Change the EDD 'Downloads' menu position | |
define('EDD_MENU_POSITION', 25); |
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
// Change 'download' slug to something else | |
define('EDD_SLUG', 'books'); |
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
// Allow HTML in term descriptions | |
foreach ( array( 'pre_term_description' ) as $filter ) { | |
remove_filter( $filter, 'wp_filter_kses' ); | |
} | |
foreach ( array( 'term_description' ) as $filter ) { | |
remove_filter( $filter, 'wp_kses_data' ); | |
} |
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
if ( has_post_thumbnail() ) { | |
the_post_thumbnail('book-thumbnail', array('class' => 'new-class') ); | |
} |
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
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('book-thumbnail', array('class' => 'book-thumbnail')); ?></a> |
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
$term_name = single_cat_title( $prefix = '', $display = false ); | |
echo '<h1 class="entry-title" itemprop="headline">' . $term_name . '</h1>'; |
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
//* Register widget areas | |
genesis_register_sidebar( array( | |
'id' => 'after-post', | |
'name' => __( 'After Post', 'theme-name' ), | |
'description' => __( 'This is the widget that appears after a single posts.', 'theme-name' ), | |
) ); |