Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action('after_setup_theme','remove_parent_widgets');
- function remove_parent_widgets() {
- remove_filter('get_the_excerpt', 'appointment_post_slider_excerpt');
- }
- add_filter('get_the_excerpt', 'appointment_post_slider_excerpt1');
- function appointment_post_slider_excerpt1($output) {
- $output = strip_tags(preg_replace(" (\[.*?\])", '', $output));
- $output = strip_shortcodes($output);
- $original_len = strlen($output);
- $output = substr($output, 0, 1000);
- $len = strlen($output);
- if ($original_len > 1000) {
- $output = $output;
- return '<div class="slide-text-bg2">' . '<span>' . $output . '</span>' . '</div>' .
- '<div class="slide-btn-area-sm"><a href="' . esc_url(get_permalink()) . '" class="slide-btn-sm">'
- . esc_html__("Read More", "appointment") . '</a></div>';
- } else {
- return '<div class="slide-text-bg2">' . '<span>' . $output . '</span>' . '</div>';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement