<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>

		<title>Recent Post Excerpt and Excerpt Length &#8211; Cornerstone &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/feed/</link>
		<description></description>
		<lastBuildDate>Mon, 20 Oct 2025 02:22:52 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-283359</guid>
					<title><![CDATA[Recent Post Excerpt and Excerpt Length &#8211; Cornerstone]]></title>
					<link>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-283359</link>
					<pubDate>Wed, 27 May 2015 20:44:41 +0000</pubDate>
					<dc:creator>Sean S</dc:creator>

					<description>
						<![CDATA[
						<p>Referencing this post <a href="https://community.theme.co//forums/topic/add-excerpt-to-recent-posts-shortcode/" rel="nofollow">/add-excerpt-to-recent-posts-shortcode/</a></p>
<p>I added the code to my functions.php on my child them for the excerpt and excerpt length. Everything worked perfect, until I started going back and fixing all my posts in visual composer. There was code added in that post above to visual composer, but now I have upgraded to 4.0 and cornerstone. After the update, I lost all excerpts. So, I am guessing there may need to be a code update as well to add back the excerpts?</p>
<p>Thank You! </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-283713</guid>
					<title><![CDATA[Reply To: Recent Post Excerpt and Excerpt Length &#8211; Cornerstone]]></title>
					<link>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-283713</link>
					<pubDate>Thu, 28 May 2015 01:04:53 +0000</pubDate>
					<dc:creator>Rad</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,</p>
<p>Thanks for writing in.</p>
<p>From the customization from that thread, could you try changing this code :</p>
<pre><code>function change_recent_posts_to_v2() {
	remove_shortcode( &#039;recent_posts&#039; );
	add_shortcode( &#039;recent_posts&#039;, &#039;x_shortcode_recent_posts_v2code&#039; );
}</code></pre>
<p>to this?</p>
<pre><code>function change_recent_posts_to_v2() {
	remove_shortcode( &#039;x_recent_posts&#039; );
	add_shortcode( &#039;x_recent_posts&#039;, &#039;x_shortcode_recent_posts_v2code&#039; );
}</code></pre>
<p>Thanks and let us know.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-287947</guid>
					<title><![CDATA[Reply To: Recent Post Excerpt and Excerpt Length &#8211; Cornerstone]]></title>
					<link>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-287947</link>
					<pubDate>Sun, 31 May 2015 23:20:39 +0000</pubDate>
					<dc:creator>Sean S</dc:creator>

					<description>
						<![CDATA[
						This reply has been marked as private.						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-288248</guid>
					<title><![CDATA[Reply To: Recent Post Excerpt and Excerpt Length &#8211; Cornerstone]]></title>
					<link>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-288248</link>
					<pubDate>Mon, 01 Jun 2015 06:40:28 +0000</pubDate>
					<dc:creator>Rue Nel</dc:creator>

					<description>
						<![CDATA[
						<p>Hello There,</p>
<p>We made a couple of changes to the recent post shortcode in Cornerstone. You might want to update your code and replace it with this code instead;</p>
<pre><code>// Recent Posts (new code in Cornerstone)
// =============================================================================

function x_shortcode_recent_posts_cs_code( $atts ) {
  extract( shortcode_atts( array(
    &#039;id&#039;          =&gt; &#039;&#039;,
    &#039;class&#039;       =&gt; &#039;&#039;,
    &#039;style&#039;       =&gt; &#039;&#039;,
    &#039;type&#039;        =&gt; &#039;post&#039;,
    &#039;count&#039;       =&gt; &#039;&#039;,
    &#039;category&#039;    =&gt; &#039;&#039;,
    &#039;offset&#039;      =&gt; &#039;&#039;,
    &#039;orientation&#039; =&gt; &#039;&#039;,
    &#039;no_image&#039;    =&gt; &#039;&#039;,
    &#039;fade&#039;        =&gt; &#039;&#039;,

    &#039;enable_excerpt&#039; =&gt; &#039;&#039;,

  ), $atts, &#039;x_recent_posts&#039; ) );

  $allowed_post_types = apply_filters( &#039;cs_recent_posts_post_types&#039;, array( &#039;post&#039; =&gt; &#039;post&#039; ) );
  $type = ( isset( $allowed_post_types[$type] ) ) ? $allowed_post_types[$type] : &#039;post&#039;;

  $id            = ( $id          != &#039;&#039;          ) ? &#039;id=&quot;&#039; . esc_attr( $id ) . &#039;&quot;&#039; : &#039;&#039;;
  $class         = ( $class       != &#039;&#039;          ) ? &#039;x-recent-posts cf &#039; . esc_attr( $class ) : &#039;x-recent-posts cf&#039;;
  $style         = ( $style       != &#039;&#039;          ) ? &#039;style=&quot;&#039; . $style . &#039;&quot;&#039; : &#039;&#039;;
  $count         = ( $count       != &#039;&#039;          ) ? $count : 3;
  $category      = ( $category    != &#039;&#039;          ) ? $category : &#039;&#039;;
  $category_type = ( $type        == &#039;post&#039;      ) ? &#039;category_name&#039; : &#039;portfolio-category&#039;;
  $offset        = ( $offset      != &#039;&#039;          ) ? $offset : 0;
  $orientation   = ( $orientation != &#039;&#039;          ) ? &#039; &#039; . $orientation : &#039; horizontal&#039;;
  $no_image      = ( $no_image    == &#039;true&#039;      ) ? $no_image : &#039;&#039;;
  $fade          = ( $fade        == &#039;true&#039;      ) ? $fade : &#039;false&#039;;

  $enable_excerpt = ( $enable_excerpt == &#039;true&#039;      ) ? true : false;

  $js_params = array(
    &#039;fade&#039; =&gt; ( $fade == &#039;true&#039; )
  );

  $data = cs_generate_data_attributes( &#039;recent_posts&#039;, $js_params );

  $output = &quot;&lt;div {$id} class=\&quot;{$class}{$orientation}\&quot; {$style} {$data} data-fade=\&quot;{$fade}\&quot; &gt;&quot;;

    $q = new WP_Query( array(
      &#039;orderby&#039;          =&gt; &#039;date&#039;,
      &#039;post_type&#039;        =&gt; &quot;{$type}&quot;,
      &#039;posts_per_page&#039;   =&gt; &quot;{$count}&quot;,
      &#039;offset&#039;           =&gt; &quot;{$offset}&quot;,
      &quot;{$category_type}&quot; =&gt; &quot;{$category}&quot;
    ) );

    if ( $q-&gt;have_posts() ) : while ( $q-&gt;have_posts() ) : $q-&gt;the_post();

      if ( $no_image == &#039;true&#039; ) {
        $image_output       = &#039;&#039;;
        $image_output_class = &#039;no-image&#039;;
      } else {
        $image              = wp_get_attachment_image_src( get_post_thumbnail_id(), &#039;entry-cropped&#039; );
        $bg_image           = ( $image[0] != &#039;&#039; ) ? &#039; style=&quot;background-image: url(&#039; . $image[0] . &#039;);&quot;&#039; : &#039;&#039;;
        $image_output       = &#039;&lt;div class=&quot;x-recent-posts-img&quot;&#039; . $bg_image . &#039;&gt;&lt;/div&gt;&#039;;
        $image_output_class = &#039;with-image&#039;;
      }

      $output .= &#039;&lt;a class=&quot;x-recent-post&#039; . $count . &#039; &#039; . $image_output_class . &#039;&quot; href=&quot;&#039; . get_permalink( get_the_ID() ) . &#039;&quot; title=&quot;&#039; . esc_attr( sprintf( __( &#039;Permalink to: &quot;%s&quot;&#039;, csl18n() ), the_title_attribute( &#039;echo=0&#039; ) ) ) . &#039;&quot;&gt;&#039;
                 . &#039;&lt;article id=&quot;post-&#039; . get_the_ID() . &#039;&quot; class=&quot;&#039; . implode( &#039; &#039;, get_post_class() ) . &#039;&quot;&gt;&#039;
                   . &#039;&lt;div class=&quot;entry-wrap&quot;&gt;&#039;
                     . $image_output
                     . &#039;&lt;div class=&quot;x-recent-posts-content&quot;&gt;&#039;
                       . &#039;&lt;h3 class=&quot;h-recent-posts&quot;&gt;&#039; . get_the_title() . &#039;&lt;/h3&gt;&#039;
                       . &#039;&lt;span class=&quot;x-recent-posts-date&quot;&gt;&#039; . get_the_date() . &#039;&lt;/span&gt;&#039;
                       . ( $enable_excerpt ? &#039;&lt;span class=&quot;x-recent-posts-excerpt&quot;&gt;&#039; . strip_tags( get_the_excerpt() ) . &#039;&lt;/span&gt;&#039; : &#039;&#039; )
                     . &#039;&lt;/div&gt;&#039;
                   . &#039;&lt;/div&gt;&#039;
                 . &#039;&lt;/article&gt;&#039;
               . &#039;&lt;/a&gt;&#039;;

    endwhile; endif; wp_reset_postdata();

  $output .= &#039;&lt;/div&gt;&#039;;

  return $output;
}

add_action(&#039;wp_head&#039;, &#039;change_recent_posts_to_v3&#039;);
function change_recent_posts_to_v3() {
	remove_shortcode( &#039;x_recent_posts&#039; );
	add_shortcode( &#039;x_recent_posts&#039;, &#039;x_shortcode_recent_posts_cs_code&#039; );
}</code></pre>
<p>Please let us know if this works out for you.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-289002</guid>
					<title><![CDATA[Reply To: Recent Post Excerpt and Excerpt Length &#8211; Cornerstone]]></title>
					<link>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-289002</link>
					<pubDate>Mon, 01 Jun 2015 20:15:20 +0000</pubDate>
					<dc:creator>Sean S</dc:creator>

					<description>
						<![CDATA[
						<p>That is a negative Ghost Rider. You can check out the link on the private post above. I deleted the old code and I dropped in the code. It went back to normal looking without trying to add an excerpt. </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-289556</guid>
					<title><![CDATA[Reply To: Recent Post Excerpt and Excerpt Length &#8211; Cornerstone]]></title>
					<link>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-289556</link>
					<pubDate>Tue, 02 Jun 2015 09:02:10 +0000</pubDate>
					<dc:creator>Paul R</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Sean,</p>
<p>You can try the code below instead</p>
<pre><code>
function x_shortcode_recent_posts_v2code( $atts ) {
  extract( shortcode_atts( array(
    &#039;id&#039;          =&gt; &#039;&#039;,
    &#039;class&#039;       =&gt; &#039;&#039;,
    &#039;style&#039;       =&gt; &#039;&#039;,
    &#039;type&#039;        =&gt; &#039;&#039;,
    &#039;count&#039;       =&gt; &#039;&#039;,
    &#039;category&#039;    =&gt; &#039;&#039;,
    &#039;enable_excerpt&#039; =&gt; &#039;&#039;,
    &#039;offset&#039;      =&gt; &#039;&#039;,
    &#039;orientation&#039; =&gt; &#039;&#039;,
    &#039;no_image&#039;    =&gt; &#039;&#039;,
    &#039;fade&#039;        =&gt; &#039;&#039;
  ), $atts ) );

  $id            = ( $id          != &#039;&#039;          ) ? &#039;id=&quot;&#039; . esc_attr( $id ) . &#039;&quot;&#039; : &#039;&#039;;
  $class         = ( $class       != &#039;&#039;          ) ? &#039;x-recent-posts cf &#039; . esc_attr( $class ) : &#039;x-recent-posts cf&#039;;
  $style         = ( $style       != &#039;&#039;          ) ? &#039;style=&quot;&#039; . $style . &#039;&quot;&#039; : &#039;&#039;;
  $type          = ( $type        == &#039;portfolio&#039; ) ? &#039;x-portfolio&#039; : &#039;post&#039;;
  $count         = ( $count       != &#039;&#039;          ) ? $count : 3;
  $category      = ( $category    != &#039;&#039;          ) ? $category : &#039;&#039;;
  $category_type = ( $type        == &#039;post&#039;      ) ? &#039;category_name&#039; : &#039;portfolio-category&#039;;
  $offset        = ( $offset      != &#039;&#039;          ) ? $offset : 0;
  $orientation   = ( $orientation != &#039;&#039;          ) ? &#039; &#039; . $orientation : &#039; horizontal&#039;;
  $no_image      = ( $no_image    == &#039;true&#039;      ) ? $no_image : &#039;&#039;;
  $fade          = ( $fade        == &#039;true&#039;      ) ? $fade : &#039;false&#039;;
  $enable_excerpt = ( $enable_excerpt == &#039;true&#039;      ) ? true : false;

  $output = &quot;&lt;div {$id} class=\&quot;{$class}{$orientation}\&quot; {$style} data-fade=\&quot;{$fade}\&quot;&gt;&quot;;

    $q = new WP_Query( array(
      &#039;orderby&#039;          =&gt; &#039;date&#039;,
      &#039;post_type&#039;        =&gt; &quot;{$type}&quot;,
      &#039;posts_per_page&#039;   =&gt; &quot;{$count}&quot;,
      &#039;offset&#039;           =&gt; &quot;{$offset}&quot;,
      &quot;{$category_type}&quot; =&gt; &quot;{$category}&quot;
    ) );

    if ( $q-&gt;have_posts() ) : while ( $q-&gt;have_posts() ) : $q-&gt;the_post();
     $content_excerpt = get_the_excerpt();

      if ( $no_image == &#039;true&#039; ) {
        $image_output       = &#039;&#039;;
        $image_output_class = &#039;no-image&#039;;
      } else {
        $image_output       = &#039;&lt;div class=&quot;x-recent-posts-img&quot;&gt;&#039; . get_the_post_thumbnail( get_the_ID(), &#039;entry-&#039; . get_theme_mod( &#039;x_stack&#039; ) . &#039;-cropped&#039;, NULL ) . &#039;&lt;/div&gt;&#039;;
        $image_output_class = &#039;with-image&#039;;
      }
      setup_postdata( $post );
      $output .= &#039;&lt;a class=&quot;x-recent-post&#039; . $count . &#039; &#039; . $image_output_class . &#039;&quot; href=&quot;&#039; . get_permalink( get_the_ID() ) . &#039;&quot; title=&quot;&#039; . esc_attr( sprintf( __( &#039;Permalink to: &quot;%s&quot;&#039;, &#039;__x__&#039; ), the_title_attribute( &#039;echo=0&#039; ) ) ) . &#039;&quot;&gt;&#039;
                 . &#039;&lt;article id=&quot;post-&#039; . get_the_ID() . &#039;&quot; class=&quot;&#039; . implode( &#039; &#039;, get_post_class() ) . &#039;&quot;&gt;&#039;
                   . &#039;&lt;div class=&quot;entry-wrap&quot;&gt;&#039;
                     . $image_output
                     . &#039;&lt;div class=&quot;x-recent-posts-content&quot;&gt;&#039;
                       . &#039;&lt;h3 class=&quot;h-recent-posts&quot;&gt;&#039; . get_the_title() . &#039;&lt;/h3&gt;&#039;
                       . &#039;&lt;span class=&quot;x-recent-posts-date&quot;&gt;&#039; . get_the_date() . &#039;&lt;/span&gt;&#039;
                       . ( $enable_excerpt ? &#039;&lt;span class=&quot;x-recent-posts-excerpt&quot;&gt;&#039; . strip_tags($content_excerpt ) . &#039;dfgfdgfd&lt;/span&gt;&#039; : &#039;&#039; )
                     . &#039;&lt;/div&gt;&#039;
                   . &#039;&lt;/div&gt;&#039;
                 . &#039;&lt;/article&gt;&#039;
               . &#039;&lt;/a&gt;&#039;;

    endwhile; endif; wp_reset_postdata();
  
  $output .= &#039;&lt;/div&gt;&#039;;

  return $output;
}

add_action(&#039;wp_head&#039;, &#039;change_recent_posts_to_v2&#039;);

function change_recent_posts_to_v2() {
  remove_shortcode( &#039;recent_posts&#039; );
  add_shortcode( &#039;recent_posts&#039;, &#039;x_shortcode_recent_posts_v2code&#039; );
}
</code></pre>
<p>If it still doesn&#8217;t help, would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:</p>
<p>&#8211; Link to your site<br />
&#8211; WordPress Admin username / password<br />
&#8211; FTP credentials</p>
<p><strong>Don&#8217;t forget to select Set as private reply. This ensures your information is only visible to our staff. </strong></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-297330</guid>
					<title><![CDATA[Reply To: Recent Post Excerpt and Excerpt Length &#8211; Cornerstone]]></title>
					<link>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-297330</link>
					<pubDate>Tue, 09 Jun 2015 21:11:47 +0000</pubDate>
					<dc:creator>Sean S</dc:creator>

					<description>
						<![CDATA[
						This reply has been marked as private.						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-297951</guid>
					<title><![CDATA[Reply To: Recent Post Excerpt and Excerpt Length &#8211; Cornerstone]]></title>
					<link>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-297951</link>
					<pubDate>Wed, 10 Jun 2015 12:40:04 +0000</pubDate>
					<dc:creator>Christopher</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,</p>
<p>Sorry for back and forth we had in here, I tested the following code and worked fine, so please  update your code in functions.php file :</p>
<pre><code>
// Additional Functions
// =============================================================================
function x_shortcode_recent_posts_v2code( $atts ) {
  extract( shortcode_atts( array(
    &#039;id&#039;          =&gt; &#039;&#039;,
    &#039;class&#039;       =&gt; &#039;&#039;,
    &#039;style&#039;       =&gt; &#039;&#039;,
    &#039;type&#039;        =&gt; &#039;&#039;,
    &#039;count&#039;       =&gt; &#039;&#039;,
    &#039;category&#039;    =&gt; &#039;&#039;,
    &#039;enable_excerpt&#039; =&gt; &#039;&#039;,
    &#039;offset&#039;      =&gt; &#039;&#039;,
    &#039;orientation&#039; =&gt; &#039;&#039;,
    &#039;no_image&#039;    =&gt; &#039;&#039;,
    &#039;fade&#039;        =&gt; &#039;&#039;
  ), $atts ) );

  $id            = ( $id          != &#039;&#039;          ) ? &#039;id=&quot;&#039; . esc_attr( $id ) . &#039;&quot;&#039; : &#039;&#039;;
  $class         = ( $class       != &#039;&#039;          ) ? &#039;x-recent-posts cf &#039; . esc_attr( $class ) : &#039;x-recent-posts cf&#039;;
  $style         = ( $style       != &#039;&#039;          ) ? &#039;style=&quot;&#039; . $style . &#039;&quot;&#039; : &#039;&#039;;
  $type          = ( $type        == &#039;portfolio&#039; ) ? &#039;x-portfolio&#039; : &#039;post&#039;;
  $count         = ( $count       != &#039;&#039;          ) ? $count : 3;
  $category      = ( $category    != &#039;&#039;          ) ? $category : &#039;&#039;;
  $category_type = ( $type        == &#039;post&#039;      ) ? &#039;category_name&#039; : &#039;portfolio-category&#039;;
  $offset        = ( $offset      != &#039;&#039;          ) ? $offset : 0;
  $orientation   = ( $orientation != &#039;&#039;          ) ? &#039; &#039; . $orientation : &#039; horizontal&#039;;
  $no_image      = ( $no_image    == &#039;true&#039;      ) ? $no_image : &#039;&#039;;
  $fade          = ( $fade        == &#039;true&#039;      ) ? $fade : &#039;false&#039;;
  $enable_excerpt = ( $enable_excerpt == &#039;true&#039;      ) ? true : false;

  $output = &quot;&lt;div {$id} class=\&quot;{$class}{$orientation}\&quot; {$style} data-fade=\&quot;{$fade}\&quot;&gt;&quot;;

    $q = new WP_Query( array(
      &#039;orderby&#039;          =&gt; &#039;date&#039;,
      &#039;post_type&#039;        =&gt; &quot;{$type}&quot;,
      &#039;posts_per_page&#039;   =&gt; &quot;{$count}&quot;,
      &#039;offset&#039;           =&gt; &quot;{$offset}&quot;,
      &quot;{$category_type}&quot; =&gt; &quot;{$category}&quot;
    ) );

    if ( $q-&gt;have_posts() ) : while ( $q-&gt;have_posts() ) : $q-&gt;the_post();

      if ( $no_image == &#039;true&#039; ) {
        $image_output       = &#039;&#039;;
        $image_output_class = &#039;no-image&#039;;
      } else {
        $image_output       = &#039;&lt;div class=&quot;x-recent-posts-img&quot;&gt;&#039; . get_the_post_thumbnail( get_the_ID(), &#039;entry-&#039; . get_theme_mod( &#039;x_stack&#039; ) . &#039;-cropped&#039;, NULL ) . &#039;&lt;/div&gt;&#039;;
        $image_output_class = &#039;with-image&#039;;
      }

      $output .= &#039;&lt;a href=&quot;&#039; . get_permalink( get_the_ID() ) . &#039;&quot;&gt;&#039;
                 . &#039;&lt;article id=&quot;post-&#039; . get_the_ID() . &#039;&quot; class=&quot;&#039; . implode( &#039; &#039;, get_post_class() ) . &#039;&quot;&gt;&#039;
                   . &#039;&lt;div class=&quot;entry-wrap&quot;&gt;&#039;
                     . $image_output
                     . &#039;&lt;div class=&quot;x-recent-posts-content&quot;&gt;&#039;
                       . &#039;&lt;h3 class=&quot;h-recent-posts&quot;&gt;&#039; . get_the_title() . &#039;&lt;/h3&gt;&#039;
                       . &#039;&lt;span class=&quot;x-recent-posts-date&quot;&gt;&#039; . get_the_date() . &#039;&lt;/span&gt;&#039;
                       . ( $enable_excerpt ? &#039;&lt;span class=&quot;x-recent-posts-excerpt&quot;&gt;&#039; . strip_tags( get_the_excerpt() ) . &#039;&lt;/span&gt;&#039; : &#039;&#039; )
                     . &#039;&lt;/div&gt;&#039;
                   . &#039;&lt;/div&gt;&#039;
                 . &#039;&lt;/article&gt;&#039;
               . &#039;&lt;/a&gt;&#039;;

    endwhile; endif; wp_reset_postdata();
  
  $output .= &#039;&lt;/div&gt;&#039;;

  return $output;
}

add_action(&#039;wp_head&#039;, &#039;change_recent_posts_to_v2&#039;);

function change_recent_posts_to_v2() {
  remove_shortcode( &#039;x_recent_posts&#039; );
  add_shortcode( &#039;x_recent_posts&#039;, &#039;x_shortcode_recent_posts_v2code&#039; );
}

</code></pre>
<p>Now add <code>enable_excerpt=&quot;true&quot;</code> attribute to recent posts shortcode.</p>
<p>Example :</p>
<p><code>[x_recent_posts type=&quot;post&quot; enable_excerpt=&quot;true&quot; count=&quot;3&quot; orientation=&quot;horizontal&quot;]</code></p>
<p>Add recent post shortcode to text element.</p>
<p>Hope it helps.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-298181</guid>
					<title><![CDATA[Reply To: Recent Post Excerpt and Excerpt Length &#8211; Cornerstone]]></title>
					<link>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-298181</link>
					<pubDate>Wed, 10 Jun 2015 16:54:35 +0000</pubDate>
					<dc:creator>Sean S</dc:creator>

					<description>
						<![CDATA[
						<p>2 Things. </p>
<p>1 &#8211; Excerpts works, but if I edit in the text, I am unable to use Cornerstone and adding enable_excerpt=&#8221;true&#8221; cannot be done in Cornerstone that I am aware of. I guess I can always finish the layout in cornerstone, then go back into the text editor to add manually. </p>
<p>2 &#8211; The layout went all crazy. Go to the link on the private post to see. </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-298809</guid>
					<title><![CDATA[Reply To: Recent Post Excerpt and Excerpt Length &#8211; Cornerstone]]></title>
					<link>https://theme.co/archive/forums/topic/recent-post-excerpt-and-excerpt-length-cornerstone/#post-298809</link>
					<pubDate>Thu, 11 Jun 2015 08:26:07 +0000</pubDate>
					<dc:creator>Paul R</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Sean,</p>
<p>1. You can add it in text element text editor mode.</p>
<p><a href="http://screencast.com/t/QAxdGXc1OV" rel="nofollow">http://screencast.com/t/QAxdGXc1OV</a></p>
<p>I was able to change your recent_posts elements into text elements and added the shortcodes.</p>
<p>2. I was able to fix this by changing the code in your child theme&#8217;s functions.php to this.</p>
<pre><code>
function x_shortcode_recent_posts_v2code( $atts ) {
  extract( shortcode_atts( array(
    &#039;id&#039;          =&gt; &#039;&#039;,
    &#039;class&#039;       =&gt; &#039;&#039;,
    &#039;style&#039;       =&gt; &#039;&#039;,
    &#039;type&#039;        =&gt; &#039;post&#039;,
    &#039;count&#039;       =&gt; &#039;&#039;,
    &#039;category&#039;    =&gt; &#039;&#039;,
    &#039;offset&#039;      =&gt; &#039;&#039;,
    &#039;orientation&#039; =&gt; &#039;&#039;,
    &#039;no_image&#039;    =&gt; &#039;&#039;,
    &#039;fade&#039;        =&gt; &#039;&#039;,
    &#039;enable_excerpt&#039; =&gt; &#039;&#039;
  ), $atts, &#039;x_recent_posts&#039; ) );

  $allowed_post_types = apply_filters( &#039;cs_recent_posts_post_types&#039;, array( &#039;post&#039; =&gt; &#039;post&#039; ) );
  $type = ( isset( $allowed_post_types[$type] ) ) ? $allowed_post_types[$type] : &#039;post&#039;;

  $id            = ( $id          != &#039;&#039;          ) ? &#039;id=&quot;&#039; . esc_attr( $id ) . &#039;&quot;&#039; : &#039;&#039;;
  $class         = ( $class       != &#039;&#039;          ) ? &#039;x-recent-posts cf &#039; . esc_attr( $class ) : &#039;x-recent-posts cf&#039;;
  $style         = ( $style       != &#039;&#039;          ) ? &#039;style=&quot;&#039; . $style . &#039;&quot;&#039; : &#039;&#039;;
  $count         = ( $count       != &#039;&#039;          ) ? $count : 3;
  $category      = ( $category    != &#039;&#039;          ) ? $category : &#039;&#039;;
  $category_type = ( $type        == &#039;post&#039;      ) ? &#039;category_name&#039; : &#039;portfolio-category&#039;;
  $offset        = ( $offset      != &#039;&#039;          ) ? $offset : 0;
  $orientation   = ( $orientation != &#039;&#039;          ) ? &#039; &#039; . $orientation : &#039; horizontal&#039;;
  $no_image      = ( $no_image    == &#039;true&#039;      ) ? $no_image : &#039;&#039;;
  $fade          = ( $fade        == &#039;true&#039;      ) ? $fade : &#039;false&#039;;
  $enable_excerpt = ( $enable_excerpt == &#039;true&#039; ) ? true:false;

  $js_params = array(
    &#039;fade&#039; =&gt; ( $fade == &#039;true&#039; )
  );

  $data = cs_generate_data_attributes( &#039;recent_posts&#039;, $js_params );

  $output = &quot;&lt;div {$id} class=\&quot;{$class}{$orientation}\&quot; {$style} {$data} data-fade=\&quot;{$fade}\&quot; &gt;&quot;;

    $q = new WP_Query( array(
      &#039;orderby&#039;          =&gt; &#039;date&#039;,
      &#039;post_type&#039;        =&gt; &quot;{$type}&quot;,
      &#039;posts_per_page&#039;   =&gt; &quot;{$count}&quot;,
      &#039;offset&#039;           =&gt; &quot;{$offset}&quot;,
      &quot;{$category_type}&quot; =&gt; &quot;{$category}&quot;
    ) );

    if ( $q-&gt;have_posts() ) : while ( $q-&gt;have_posts() ) : $q-&gt;the_post();
     $content_excerpt = get_the_excerpt();

      if ( $no_image == &#039;true&#039; ) {
        $image_output       = &#039;&#039;;
        $image_output_class = &#039;no-image&#039;;
      } else {
        $image              = wp_get_attachment_image_src( get_post_thumbnail_id(), &#039;entry-cropped&#039; );
        $bg_image           = ( $image[0] != &#039;&#039; ) ? &#039; style=&quot;background-image: url(&#039; . $image[0] . &#039;);&quot;&#039; : &#039;&#039;;
        $image_output       = &#039;&lt;div class=&quot;x-recent-posts-img&quot;&#039; . $bg_image . &#039;&gt;&lt;/div&gt;&#039;;
        $image_output_class = &#039;with-image&#039;;
      }

      $output .= &#039;&lt;a class=&quot;x-recent-post&#039; . $count . &#039; &#039; . $image_output_class . &#039;&quot; href=&quot;&#039; . get_permalink( get_the_ID() ) . &#039;&quot; title=&quot;&#039; . esc_attr( sprintf( __( &#039;Permalink to: &quot;%s&quot;&#039;, csl18n() ), the_title_attribute( &#039;echo=0&#039; ) ) ) . &#039;&quot;&gt;&#039;
                 . &#039;&lt;article id=&quot;post-&#039; . get_the_ID() . &#039;&quot; class=&quot;&#039; . implode( &#039; &#039;, get_post_class() ) . &#039;&quot;&gt;&#039;
                   . &#039;&lt;div class=&quot;entry-wrap&quot;&gt;&#039;
                     . $image_output
                     . &#039;&lt;div class=&quot;x-recent-posts-content&quot;&gt;&#039;
                       . &#039;&lt;h3 class=&quot;h-recent-posts&quot;&gt;&#039; . get_the_title() . &#039;&lt;/h3&gt;&#039;
                       . &#039;&lt;span class=&quot;x-recent-posts-date&quot;&gt;&#039; . get_the_date() . &#039;&lt;/span&gt;&#039;
                       . ( $enable_excerpt ? &#039;&lt;span class=&quot;x-recent-posts-excerpt&quot;&gt;&#039; . strip_tags($content_excerpt ) . &#039;&lt;/span&gt;&#039; : &#039;&#039; )
                     . &#039;&lt;/div&gt;&#039;
                   . &#039;&lt;/div&gt;&#039;
                 . &#039;&lt;/article&gt;&#039;
               . &#039;&lt;/a&gt;&#039;;

    endwhile; endif; wp_reset_postdata();

  $output .= &#039;&lt;/div&gt;&#039;;

  return $output;
}

add_action(&#039;wp_head&#039;, &#039;change_recent_posts_to_v2&#039;);

function change_recent_posts_to_v2() {
  remove_shortcode( &#039;x_recent_posts&#039; );
  add_shortcode( &#039;x_recent_posts&#039;, &#039;x_shortcode_recent_posts_v2code&#039; );
}

// Excerpt Custom Length
// =============================================================================
function x_excerpt_length( $length ) {
    return 60;
}  
add_filter( &#039;excerpt_length&#039;, &#039;x_excerpt_length&#039; );
</code></pre>
<p>Kindly check on your end.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

