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="http://www.example.com/page.php?key1=value&key2=value">link</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
<?php | |
// Add "Read More" link to automatic excerpts | |
add_filter('the_content_more_link', 'wpm_get_read_more_link'); | |
add_filter('get_the_content_more_link', 'wpm_get_read_more_link'); // Genesis Framework only | |
add_filter('excerpt_more', 'wpm_get_read_more_link'); | |
function wpm_get_read_more_link() { | |
global $post; | |
return '… <a href="' . get_permalink($post->ID) . '">[Continue reading] <span class="screen-reader-text">' . get_the_title() . '</span></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
<?php | |
// Add "Read More" link to hand-crafted excerpts | |
add_filter('get_the_excerpt', 'wpm_manual_excerpt_read_more_link'); | |
function wpm_manual_excerpt_read_more_link($excerpt) { | |
$excerpt_more = ''; | |
if (has_excerpt() && ! is_attachment() && get_post_type() == 'post') { | |
$excerpt_more = ' <a href="' . get_permalink() . '">[Continue reading] <span class="screen-reader-text">' . get_the_title() . '</span></a>'; | |
} | |
return $excerpt . $excerpt_more; |
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 "Read More" link to automatic excerpts | |
add_filter('the_content_more_link', 'wpm_get_read_more_link'); | |
add_filter('get_the_content_more_link', 'wpm_get_read_more_link'); // Genesis Framework only | |
add_filter('excerpt_more', 'wpm_get_read_more_link'); | |
function wpm_get_read_more_link() { | |
global $post; | |
return '… <a href="' . get_permalink($post->ID) . '">[Continue reading] <span class="screen-reader-text">' . get_the_title() . '</span></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
<?php | |
// Add author box to single posts and author archives | |
add_filter( 'get_the_author_genesis_author_box_single', '__return_true' ); | |
add_filter( 'get_the_author_genesis_author_box_archive', '__return_true' ); | |
// And remove it from anything that's not a post | |
add_action ('genesis_entry_footer', 'wpm_remove_author_box' ); | |
function wpm_remove_author_box() { | |
if ( get_post_type() != 'post' ) { |
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 author box to single posts and author archives | |
add_filter( 'get_the_author_genesis_author_box_single', '__return_true' ); | |
add_filter( 'get_the_author_genesis_author_box_archive', '__return_true' ); | |
// And remove it from anything that's not a post | |
add_action ('genesis_entry_footer', 'wpm_remove_author_box' ); | |
function wpm_remove_author_box() { | |
if ( get_post_type() == 'snippet' ) { |
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 | |
// And remove it from anything that's not a post | |
add_action ('genesis_entry_footer', 'wpm_remove_author_box' ); | |
function wpm_remove_author_box() { | |
if ( get_post_type() != 'post' ) { | |
remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 ); | |
} | |
} |
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 author box to single posts and author archives | |
add_filter( 'get_the_author_genesis_author_box_single', '__return_true' ); | |
add_filter( 'get_the_author_genesis_author_box_archive', '__return_true' ); |
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 details on product category archive pages | |
add_action( 'woocommerce_after_shop_loop', 'wpm_product_cat_archive_add_meta' ); | |
function wpm_product_cat_archive_add_meta() { | |
$t_id = get_queried_object()->term_id; | |
$term_meta = get_option( "taxonomy_$t_id" ); | |
$term_meta_content = $term_meta['custom_term_meta']; | |
if ( $term_meta_content != '' ) { |