WordPress.org

Ready to get started?Download WordPress

Forums

Post UI Tabs
how to remove Post UI Tabs shortcode in excerpts (2 posts)

  1. todaydownloadz
    Member
    Posted 11 months ago #

    i am trying to remove post ui shortcode in excerpts. please anyone have done this please help me .

    [tab name="xxxxxx"] are added to the exceprts always. is there any settings to solve this issue ?

    thank you

    http://wordpress.org/plugins/put/

  2. todaydownloadz
    Member
    Posted 11 months ago #

    i think i found the solution
    here the solution for other who are facing the same issue

    Try to add this on your functions.php

    function modify_excerpt( $text ) {
    	$text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text);
    	return $text;
    }
    add_filter( 'the_excerpt', 'modify_excerpt' );

    and then send the excerpts via this method and get the output before publishing. something like this

    <?php
    				$postExcerpt = get_the_excerpt();
    
    				$postExcerpt = modify_excerpt($postExcerpt);
    				echo $postExcerpt;
    				?>.

    Hope this will help you guys

    cheers

Reply

You must log in to post.

About this Plugin

About this Topic