Home>Support>remove siteorigin tags from excerpt

remove siteorigin tags from excerpt

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

Hi!

I have a question. How i can remove siteorigin plugin tag from post list excerpt.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 6 years, 10 months ago Przemysław Otulakowski
    /* translators: %s: Name of current post */
    			$content = get_the_content();
    			$string = preg_replace('/\[.*?\]/', '', $content);
    			$trimmed_content = wp_trim_words( $string, 30, NULL );
    			echo $trimmed_content;

    I’m use standard preg_replace. Solved problem

  2. 6 years, 10 months ago Alex S
    Hi, I Work Here

    Hi Przemysław,

    I’m glad to hear you were able to resolve this issue. I’m sorry I wasn’t able to be of assistance this time. Also, thank you for posting your solution. With that said, can you please elaborate on what tag you’re specifically referring too? Can you show me a screenshot of the issue (you’ll need to temporarily disable the provided PHP)? Please note that we’re currently unable to process attachments so you’ll need to upload it to a third party image hosting site like vgy.me or Imgur.

  3. 6 years, 10 months ago Przemysław Otulakowski

    Hi!

    Code solved problem template-parts/content.php:

    <div id="page-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    	<div class="entry-thumbnail">
    		<?php hmgbrod_post_thumbnail(); ?>
    	</div>
    		
    	<div class="entry-title">
    		<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
    	</div>
    
    	<div class="entry-content">
    		<?php
    			/* translators: %s: Name of current post */
    			$content = get_the_content();
    			$string = preg_replace('/\[.*?\]/', '', $content);
    			$trimmed_content = wp_trim_words( $string, 30, NULL );
    			echo $trimmed_content;
    		?>
    	</div>
    	
    	<div class="entry-more">
    		<a href="<?php echo get_permalink(); ?>" class="arrow-more"></a>
    	</div>
    	
    	<!-- .entry-content -->
    
    </div><!-- #page-## -->

    Views
    Before:

    After:

  4. 6 years, 10 months ago Przemysław Otulakowski

    Sory, i can’t edit post

    Before
    https://imgur.com/o70UrRP

    After
    https://imgur.com/KDmFitZ

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More