How to modify the excerpt or read more link of your template

If you want to modify the excerpt or the read more link you have 3 different ways to do it:

1. Loop Designer Options
You can define the visibility of your content and read more link in your loop template options.

2. Modify via Filter
You can modify the content and read more link with filtersFilter for the excerpt:
tk_loop_designer_the_excerpt Filter for the read more link:tk_loop_designer_read_more_link

Example function to use filters to manipulate the read more linkJust copy the following line to your functions.php and modify to your needs!

<p>add_filter('tk_loop_designer_read_more_link','change_my_read_more_link');</p><p>function change_my_read_more_link($read_more){</p><p>echo'some content'; }</p>

3. Remove completely and add your own
You can deregister the complete function from the loop_designer and build your own.

Remove the Content and read more link with this remove_action hook:

remove_action('tk_loop_designer_after_loop_title','tk_loop_designer_list_posts_content', 20 );

Let us look at how the function is responsable for the entry excerpt and read more link:

<p><strong>function tk_loop_designer_list_posts_content(){</strong></p><p><strong>global $list_post_atts, $post;</strong></p><p><strong>// Extract the arguments</strong></p><p><strong>if($list_post_atts){</strong></p><p><strong>extract($list_post_atts);</strong></p><p><strong>}</strong></p><p><strong>// check if the excerpt should be displayed</strong></p><p><strong>if($show_the_excerpt =='on')</strong></p><p><strong>echo apply_filters('tk_loop_designer_the_excerpt','<p>'. get_the_excerpt() .'</p>');</strong></p><p><strong>// check if the read more link should be displayed</strong></p><p><strong> if($show_more_link =='on') {</strong></p><p><strong>    if( $clickable =='on'){</strong></p><p><strong>echo apply_filters('tk_loop_designer_read_more_link','<p><span>'. __('read more','x2') .'</span></p>');</strong></p><p><strong>} else { </strong></p><p><strong>echo apply_filters('tk_loop_designer_read_more_link','<p><a href="<?php the_permalink() ?>" target="<?php echo $link_target; ?>">'. __('read more','x2') .'</a></p>');</strong></p><p><strong>}</strong></p><p><strong>}</strong></p><p><strong>}</strong></p>

Tip! If you want to rename the read more link to something else, you can do this also easily by changing the language files.

Please see this Plugin which makes the whole translation process very easy

Still need help? Contact Us Contact Us