Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if( !function_exists('startuply_excerpt_read_more_link') ) {
- /**
- * Add 'Read More' link to posts
- *
- * @param string $output Excerpt content
- *
- * @return string Excerpt content with added 'read more' link
- */
- function startuply_excerpt_read_more_link($output) {
- global $post;
- // Is read more enabled in settings?
- $show_read_more = startuply_option('blog_readmr', true);
- if ( $show_read_more ){
- $output = $output . ' <a href="' . get_permalink($post->ID) . '" class="more-link" title="' . __( 'Read more', 'vivaco' ) . '">' . __( 'Read more', 'vivaco' ) . '</a>';
- }
- return $output;
- }
- add_filter( 'the_excerpt', 'startuply_excerpt_read_more_link' );
- }
- if( !function_exists('startuply_modify_read_more_link') ) {
- /**
- * Modifying Read More links
- *
- * @return string Modified 'read more' link
- */
- function startuply_modify_read_more_link() {
- global $post;
- return ' <a href="' . get_permalink($post->ID) . '" class="more-link" title="' . __( 'Read more', 'vivaco' ) . '">' . __( 'Read more', 'vivaco' ) . '<i class="fa fa-angle-right"></i></a>';
- }
- add_filter( 'the_content_more_link', 'startuply_modify_read_more_link' );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement