Can’t change excerpt length and more tag

excerpt_length filter does not work on manually added filter so you use wp_trim_excerpt function, you can develop code same as following to achieve it. <?php if( has_excerpt() ){ the_excerpt(); } else { wp_trim_excerpt(); } ?> excerpt_more does not work on WordPress version 2.8.x and Older for those versions you have to use following filter. <?php … Read more

Using tag to output text in Genesis?

You can hook in the banner using the the_content_more_link filter by modifying this code. add_filter( ‘the_content_more_link’, ‘sp_read_more_link’ ); function sp_read_more_link() { return ‘<a class=”your-banner” href=”‘ . get_permalink() . ‘”>[Banner Shortcode]</a>’; } Another option would be to create a shortcode for your banner, and add the shortcode to the the_content_more_link filter above. Or you could simply … Read more

Read More link scrolling page

There is an explanation in the WordPress Codex which I copy here for reference. Don’t forget <?php and ?> <?php function remove_more_link_scroll( $link ) { $link = preg_replace( ‘|#more-[0-9]+|’, ”, $link ); return $link; } add_filter( ‘the_content_more_link’, ‘remove_more_link_scroll’ ); ?> Prevent Page Scroll When Clicking the More Link

Read more link isn’t working with custom query

Finally found the answer for anyone else out there having the same problem. Turns out for custom queries like mine using WP_Query more link functionality is OFF by default. To turn it on… this worked for me. <?php global $more; $more = 0; the_content(‘Read More’); ?>

get “read more” with custom DB query like you would with WP Query

The <!– more –> tag isn’t applied via the the_content filter, it’s included in the get_the_content() function, which checks for the existence of the tag within the content using a regex and then outputs the more link appropriately. this output is filtered via the the_content_more_link filter, but since you’re not using get_the_content() you won’t be … Read more

Different read-more link for each custom post type [closed]

No idea if this makes a difference, and don’t know about the Genesis either but give it a shot function excerpt_read_more_link($output) { global $post; if ( ‘speaker’ == get_post_type() ) { $output .= ‘<p><a class=”speaker-more-link” href=”‘. get_permalink() . ‘”>View Speaker Profile</a></p>’; } elseif ( ‘resources’ == get_post_type() ) { $output .= ‘<p><a class=”speaker-more-link” href=”‘. get_permalink() … Read more

How to customize ‘read more’

This only makes the read more link a button. add_filter( ‘excerpt_more’, ‘wpsites_read_more_link’ ); function wpsites_read_more_link( $more ) { return ‘… <a class=”more-link button” href=”‘ . get_permalink() . ‘”>Continue Reading</a>’; } Replace the button class with your themes button class.