Skip to content

Instantly share code, notes, and snippets.

@imath
Created December 17, 2015 21:10
Show Gist options
  • Save imath/74cf4c901608c2097902 to your computer and use it in GitHub Desktop.
Save imath/74cf4c901608c2097902 to your computer and use it in GitHub Desktop.
More link for WP Idea Stream < 2.3.0
<?php
/**
* Build a custom more link for Ideas
*
* This is to be used with WP Idea Stream < 2.3.0
*
* @param string $more
* @return string the more link
*/
function to_use_till_you_upgraded_to_WP_4_4_and_WP_Idea_Stream_2_3( $more = '' ) {
if ( ! wp_idea_stream_is_idea_archive() ) {
return $more;
}
return '&hellip; <a href="' . wp_idea_stream_ideas_get_permalink() . '" class="more-link">Continue reading &rarr;</a>';
}
add_filter( 'excerpt_more', 'to_use_till_you_upgraded_to_WP_4_4_and_WP_Idea_Stream_2_3', 20, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment