<?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>Add Excerpt to Recent Posts (Shortcode) &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/feed/</link>
		<description></description>
		<lastBuildDate>Sun, 19 Oct 2025 13:04:34 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-66185</guid>
					<title><![CDATA[Add Excerpt to Recent Posts (Shortcode)]]></title>
					<link>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-66185</link>
					<pubDate>Tue, 08 Jul 2014 08:20:24 +0000</pubDate>
					<dc:creator>Rob C</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,</p>
<p>Firstly, fantastic theme (visually, ease of use, features).</p>
<p>I am using the [recent posts] shortcode, and appreciate the various options for orientation, categories, etc.  The thing is, none of them provide the option to allow an excerpt to show (only the option of an image or not).</p>
<p>I&#8217;m assuming this isn&#8217;t a feature, yet, so is there a way to do this within certain php files?</p>
<p>On my homepage I have several different [recent posts] categories in separate columns.  I would like to only show the excerpt on the main &#8216;News&#8217; posts (of the news category).</p>
<p><a href="http://www.gdresource.co.uk/" title="GDResource - My Website" rel="nofollow"></a></p>
<p>Please let me know if there is a way to do this.  </p>
<p>Thanks,<br />
Rob</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-66448</guid>
					<title><![CDATA[Reply To: Add Excerpt to Recent Posts (Shortcode)]]></title>
					<link>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-66448</link>
					<pubDate>Tue, 08 Jul 2014 21:59:39 +0000</pubDate>
					<dc:creator>Joona N</dc:creator>

					<description>
						<![CDATA[
						<p>I&#8217;m also very much interested in finding a solution to this. It would be great if I could display the post titles on multiple rows, and to display an excerpt of the post content as well.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-66514</guid>
					<title><![CDATA[Reply To: Add Excerpt to Recent Posts (Shortcode)]]></title>
					<link>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-66514</link>
					<pubDate>Wed, 09 Jul 2014 03:41:26 +0000</pubDate>
					<dc:creator>Christian</dc:creator>

					<description>
						<![CDATA[
						<p>Hey guys,</p>
<p>This is feature isn&#8217;t currently supported but we have taken note of this as feature request and might implement it in a future release.</p>
<p>Thanks.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-66578</guid>
					<title><![CDATA[Reply To: Add Excerpt to Recent Posts (Shortcode)]]></title>
					<link>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-66578</link>
					<pubDate>Wed, 09 Jul 2014 09:20:53 +0000</pubDate>
					<dc:creator>Rob C</dc:creator>

					<description>
						<![CDATA[
						<p>Thanks for your reply, but that’s not very helpful.</p>
<p>I don’t mind signing a disclaimer of any sort that says it’s my fault if I ‘break’ my website. Can’t you suggest a workaround for the moment?</p>
<p>Would I edit the x-shortcode file, or would I make a new page template?</p>
<p>If so, where would I get the code to put there?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-66964</guid>
					<title><![CDATA[Reply To: Add Excerpt to Recent Posts (Shortcode)]]></title>
					<link>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-66964</link>
					<pubDate>Thu, 10 Jul 2014 03:08:06 +0000</pubDate>
					<dc:creator>Rad</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Rob,</p>
<p>Just paste this code at your child theme&#8217;s functions.php then use <strong>enable_excerpt=&#8221;true&#8221;</strong> attribute to your shortcode (eg. [recent_posts enable_excerpt=&#8221;true&#8221; ] ). Please note that switching from classic to visual composer may remove this attribute since this is not default option.</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();

      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 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( 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;recent_posts&#039; );
	add_shortcode( &#039;recent_posts&#039;, &#039;x_shortcode_recent_posts_v2code&#039; );
}</code></pre>
<p>Let us know how it goes.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-67092</guid>
					<title><![CDATA[Reply To: Add Excerpt to Recent Posts (Shortcode)]]></title>
					<link>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-67092</link>
					<pubDate>Thu, 10 Jul 2014 11:46:38 +0000</pubDate>
					<dc:creator>Tricia L</dc:creator>

					<description>
						<![CDATA[
						<p>Hello, </p>
<p>I am using the renew stack. I created a child theme, added the above code to the functions.php and also the attribute shortcode to my shortcode. But nothing happened. No expert is showing under my recent post. </p>
<p>Did I do add in the attribute wrong?<br />
[recent_posts type=&#8221;post&#8221; enable_excerpt=”true” count=&#8221;3&#8243; orientation=&#8221;horizontal&#8221; category=&#8221;Love&#8221;] </p>
<p>Thanks. </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-67479</guid>
					<title><![CDATA[Reply To: Add Excerpt to Recent Posts (Shortcode)]]></title>
					<link>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-67479</link>
					<pubDate>Fri, 11 Jul 2014 13:40:50 +0000</pubDate>
					<dc:creator>Zeshan</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Tricia,</p>
<p>Thank you for writing in!</p>
<p>It seems that the enable_excerpt attribute that you have used is having prettyquotes which may cause the issue. Instead please try using the following [recent_posts] code:</p>
<pre><code>[recent_posts type=&quot;post&quot; enable_excerpt=&quot;true&quot; count=&quot;3&quot; orientation=&quot;horizontal&quot; category=&quot;Love&quot;]
</code></pre>
<p>Hope this helps. If you still face any issue, please let us know. We&#8217;ll be happy to assist. 🙂</p>
<p>Thank you.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-73431</guid>
					<title><![CDATA[Reply To: Add Excerpt to Recent Posts (Shortcode)]]></title>
					<link>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-73431</link>
					<pubDate>Fri, 25 Jul 2014 13:49:20 +0000</pubDate>
					<dc:creator>Jennifer S</dc:creator>

					<description>
						<![CDATA[
						<p>Hi!  I just tried this solution and it works except for one thing: the excerpt losing the formatting.  So if I have something H-tagged, bolded, or on two lines, etc., that all gets lost in the excerpt.  Is there a way to have the excerpt appear formatted?  Thanks!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-73891</guid>
					<title><![CDATA[Reply To: Add Excerpt to Recent Posts (Shortcode)]]></title>
					<link>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-73891</link>
					<pubDate>Sun, 27 Jul 2014 01:17:26 +0000</pubDate>
					<dc:creator>Rad</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Jennifer,</p>
<p>Excerpts are just plain text, and that is how wordpress works. And you might need additional plugins to do that like <a href="http://wordpress.org/plugins/advanced-excerpt/" rel="nofollow">http://wordpress.org/plugins/advanced-excerpt/</a></p>
<p>Thanks!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-119087</guid>
					<title><![CDATA[Reply To: Add Excerpt to Recent Posts (Shortcode)]]></title>
					<link>https://theme.co/archive/forums/topic/add-excerpt-to-recent-posts-shortcode/#post-119087</link>
					<pubDate>Mon, 06 Oct 2014 05:22:40 +0000</pubDate>
					<dc:creator>a_roc636</dc:creator>

					<description>
						<![CDATA[
						<p>Hello, I having trouble getting the excerpts to appear using the integrity stack on vertical mode, can you help me out? Thanks.</p>
<p>All I have done so far is added the post_exerpts=&#8221;true&#8221; to the short code, do I need to do anything else? Thanks.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

