excerpt_more
-
can i pass variable to theme_excerpt_more function with add_filter command, to pass ex. $more_text. This is my code
`add_filter( ‘excerpt_more’,’theme_excerpt_more’);
function theme_excerpt_more($output) {
global $post;
return ‘… <span class=”more”><a href=”‘ . get_permalink( $post->ID ) . ‘” class=”link”>’ . __(‘More’, ‘web’) . ‘</a></span>’;
}`
and i want to pass variable $more_textadd_filter( 'excerpt_more','theme_excerpt_more'); function theme_excerpt_more($output,$more_text) { global $post; return '… <span class="more"><a href="' . get_permalink( $post->ID ) . '" class="link">' . $more_text . '</a></span>'; }
- The topic ‘excerpt_more’ is closed to new replies.