<?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>Blog excerpts showing wrong information &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/feed/</link>
		<description></description>
		<lastBuildDate>Mon, 13 Oct 2025 22:58:40 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1060844</guid>
					<title><![CDATA[Blog excerpts showing wrong information]]></title>
					<link>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1060844</link>
					<pubDate>Mon, 27 Jun 2016 04:21:10 +0000</pubDate>
					<dc:creator>flyingkiwi</dc:creator>

					<description>
						<![CDATA[
						<p>Hi,</p>
<p>I have just added the following code to my childs functions.php to fix the missing Author &amp; Updated hentry error issues</p>
<pre><code>add_filter( &#039;the_content&#039;, &#039;custom_author_code&#039;);

function custom_author_code($content) {
   if (is_singular() || is_single()) {
      return $content . 
      &#039;&lt;div class=&quot;hatom-extra&quot;&gt;&lt;span class=&quot;title&quot;&gt;&#039;. get_the_title() .&#039;&lt;/span&gt; was last modified: &lt;span class=&quot;updated&quot;&gt; &#039;. get_the_modified_time(&#039;F jS, Y&#039;) .&#039;&lt;/span&gt; by &lt;span class=&quot;author vcard&quot;&gt;&lt;span class=&quot;fn&quot;&gt;&#039;. get_the_author() .&#039;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&#039; ;
   } else {
      return $content;
   }
}</code></pre>
<p>but now my blog posts excerpts are showing &#8220;#### was last modified: ##### by #####&#8221; instead of the standard excerpt that should appear.</p>
<p>How I can get the default excerpts back but keep the hentry errors resolved? I really don&#8217;t want to have to create custom excerpts for each post..</p>
<p>Is it possible to put the hentry output into the footer or something?</p>
<p>Site: poolcarepro.com.au</p>
<p>Tom</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1060867</guid>
					<title><![CDATA[Reply To: Blog excerpts showing wrong information]]></title>
					<link>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1060867</link>
					<pubDate>Mon, 27 Jun 2016 04:57:08 +0000</pubDate>
					<dc:creator>Rad</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,</p>
<p>Thanks for posting in.</p>
<p>The <strong>the_content</strong> is a content filter, anything you add within will be displayed as content. Adding hentry will not fix the issue, it should be added to the area where it&#8217;s missing. For example, if it&#8217;s missing within posts loop in the carousel, then it should be added within the loop of the carousel.</p>
<p>Adding it anywhere will not fix it. What&#8217;s the error you&#8217;re having with hentry and what location?</p>
<p>Thanks!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1060909</guid>
					<title><![CDATA[Reply To: Blog excerpts showing wrong information]]></title>
					<link>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1060909</link>
					<pubDate>Mon, 27 Jun 2016 05:38:53 +0000</pubDate>
					<dc:creator>flyingkiwi</dc:creator>

					<description>
						<![CDATA[
						<p>Hi,</p>
<p>Please see the attached screenshot from my google webmaster tools.</p>
<p>I&#8217;ve been reading lots of forum posts about the missing hentry data issue with X theme and used the code snippet as suggested in other posts.<br />
The above in my functions.php and `.hatom-extra {<br />
   display: none;<br />
}` in my child .css &#8211; it works and adds the missing fields that google requires while hiding the ugly update line from the bottom my pages.</p>
<p>Problem is that it&#8217;s now screwing with my blog excerpts&#8230;</p>
<p>Is there another way of tackling this problem to get the best of both worlds?</p>
<p>Tom</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1060934</guid>
					<title><![CDATA[Reply To: Blog excerpts showing wrong information]]></title>
					<link>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1060934</link>
					<pubDate>Mon, 27 Jun 2016 06:08:42 +0000</pubDate>
					<dc:creator>Paul R</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Tom,</p>
<p>You need to add it to your recent posts shortcode but I can see you have already modified it.</p>
<p>Can you share to us the entire code that is in your child theme&#8217;s functions.php file.</p>
<p>Thanks</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1060942</guid>
					<title><![CDATA[Reply To: Blog excerpts showing wrong information]]></title>
					<link>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1060942</link>
					<pubDate>Mon, 27 Jun 2016 06:11:17 +0000</pubDate>
					<dc:creator>flyingkiwi</dc:creator>

					<description>
						<![CDATA[
						<pre><code>&lt;?php

// =============================================================================
// FUNCTIONS.PHP
// -----------------------------------------------------------------------------
// Overwrite or add your own custom functions to X in this file.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Enqueue Parent Stylesheet
//   02. Additional Functions
// =============================================================================

// Enqueue Parent Stylesheet
// =============================================================================

add_filter( &#039;x_enqueue_parent_stylesheet&#039;, &#039;__return_true&#039; );

// Additional Functions
// =============================================================================

// Supporting Contact form 7 date field in Firefox
// =============================================================================
add_filter( &#039;wpcf7_support_html5_fallback&#039;, &#039;__return_true&#039; );
// =============================================================================

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;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, &#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_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; );
}

// CUSTOMISING LOGIN SCREEN

function my_loginCSS() {
    wp_enqueue_style(&#039;login-styles&#039;, get_stylesheet_directory_uri() . &#039;/login/login_styles.css&#039;);
}
add_action(&#039;login_enqueue_scripts&#039;, &#039;my_loginCSS&#039;);

function my_loginURL() {
    return &#039;http://gollins.com.au&#039;;
}
add_filter(&#039;login_headerurl&#039;, &#039;my_loginURL&#039;);

function my_loginURLtext() {
    return &#039;Site by Gollins Web Design&#039;;
}
add_filter(&#039;login_headertitle&#039;, &#039;my_loginURLtext&#039;);

function my_loginfooter() { ?&gt;
    &lt;p class=&quot;loginfooter&quot;&gt;
    &lt;a class=&quot;loginfooter&quot; href=&quot;http://gollins.com.au&quot;&gt;If you have any questions, please contact us at Gollins.com.au
        &lt;/a&gt;
    &lt;/p&gt;
&lt;?php }
add_action(&#039;login_footer&#039;,&#039;my_loginfooter&#039;);

// Fix &quot;Missing Author&quot; and &quot;Missing Updated&quot; issue - START
add_filter( &#039;the_content&#039;, &#039;custom_author_code&#039;);

function custom_author_code($content) {
   if (is_singular() || is_single()) {
      return $content . 
      &#039;&lt;div class=&quot;hatom-extra&quot;&gt;&lt;span class=&quot;title&quot;&gt;&#039;. get_the_title() .&#039;&lt;/span&gt; was last modified: &lt;span class=&quot;updated&quot;&gt; &#039;. get_the_modified_time(&#039;F jS, Y&#039;) .&#039;&lt;/span&gt; by &lt;span class=&quot;author vcard&quot;&gt;&lt;span class=&quot;fn&quot;&gt;&#039;. get_the_author() .&#039;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&#039; ;
   } else {
      return $content;
   }
}
// Fix &quot;Missing Author&quot; and &quot;Missing Updated&quot; issue - END</code></pre>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1060950</guid>
					<title><![CDATA[Reply To: Blog excerpts showing wrong information]]></title>
					<link>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1060950</link>
					<pubDate>Mon, 27 Jun 2016 06:21:25 +0000</pubDate>
					<dc:creator>Rue Nel</dc:creator>

					<description>
						<![CDATA[
						<p>Hello There,</p>
<p>Please update the custom author block of code and use this instead:</p>
<pre><code>// Fix &quot;Missing Author&quot; and &quot;Missing Updated&quot; issue - START
add_filter( &#039;the_content&#039;, &#039;custom_author_code&#039;);

function custom_author_code($content) {
   if ( is_single() ) {
      return $content . 
      &#039;&lt;div class=&quot;hatom-extra&quot;&gt;&lt;span class=&quot;title&quot;&gt;&#039;. get_the_title() .&#039;&lt;/span&gt; was last modified: &lt;span class=&quot;updated&quot;&gt; &#039;. get_the_modified_time(&#039;F jS, Y&#039;) .&#039;&lt;/span&gt; by &lt;span class=&quot;author vcard&quot;&gt;&lt;span class=&quot;fn&quot;&gt;&#039;. get_the_author() .&#039;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&#039; ;
   } else {
      return $content;
   }
}
// Fix &quot;Missing Author&quot; and &quot;Missing Updated&quot; issue - END</code></pre>
<p>The code will make sure that the author and updated information will only appear in single blog posts only.<br />
Hope this helps. Kindly let us know.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1061123</guid>
					<title><![CDATA[Reply To: Blog excerpts showing wrong information]]></title>
					<link>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1061123</link>
					<pubDate>Mon, 27 Jun 2016 08:37:42 +0000</pubDate>
					<dc:creator>flyingkiwi</dc:creator>

					<description>
						<![CDATA[
						<p>That has fixed the issue of the blog excerpts not showing but leaves me with hentry issues on pages still..</p>
<p>The Posts are ok now but all the Pages still have the hentry errors of missing author and date. A page like <a href="https://poolcarepro.com.au/category/news/" rel="nofollow">https://poolcarepro.com.au/category/news/</a> has 10+ errors. </p>
<p>Reading around I&#8217;ve found some information on the topic you might be able to use to help..</p>
<p>From a support post on wordpress.org:<br />
The solution for Hentry issue is by adding the rich data snippets to each and every page that gives a listing of the posts (like search listing, author page, posts by month, blogs by category etc..) and on the post detail page.</p>
<p>And the solution provided:<br />
First create the following function in your Themes &gt;&gt; Includes &gt;&gt; theme_function.php</p>
<pre><code>function render_rich_snippets_for_pages( $title_tag = TRUE, $author_tag = TRUE, $updated_tag = TRUE ) {
global $smof_data;

$html = &#039;&#039;;

if( ! $smof_data[&#039;disable_date_rich_snippet_pages&#039;] ) {

if( $title_tag ) {
$html = &#039;&lt;span class=&quot;entry-title&quot; style=&quot;display: none;&quot;&gt;&#039; . get_the_title() . &#039;&lt;/span&gt;&#039;;
}

if( $author_tag ) {
ob_start();
the_author_posts_link();
$author_post_link = ob_get_clean();
$html .= &#039;&lt;span class=&quot;vcard&quot; style=&quot;display: none;&quot;&gt;&lt;span class=&quot;fn&quot;&gt;&#039; . $author_post_link . &#039;&lt;/span&gt;&lt;/span&gt;&#039;;
}

if( $updated_tag ) {
$html .= &#039;&lt;span class=&quot;updated&quot; style=&quot;display:none;&quot;&gt;&#039; . get_the_modified_time( &#039;c&#039; ) . &#039;&lt;/span&gt;&#039;;
}
}

return $html;
}</code></pre>
<p>Then add the following code on pages like page.php, single.php, author.php and other pages on which you are getting this error.</p>
<p><code>&lt;?php echo render_rich_snippets_for_pages(); ?&gt;</code><br />
Note: Add it in the place where the details of the blog post is fetched.</p>
<p>How can I implement this on the X theme?</p>
<p>I believe this should really be something that&#8217;s included by default in X theme&#8217;s code as every site created with X will be getting the hentry error problem. A lot of people have been asking for this for months now.</p>
<p>Tom</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1061137</guid>
					<title><![CDATA[Reply To: Blog excerpts showing wrong information]]></title>
					<link>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1061137</link>
					<pubDate>Mon, 27 Jun 2016 08:46:15 +0000</pubDate>
					<dc:creator>Rue Nel</dc:creator>

					<description>
						<![CDATA[
						<p>Hello Tom,</p>
<p>Thank you for the clarifications! To be able to use the function you&#8217;ve got from WordPress.org and apply it in X theme, please insert this following line of code in your child theme&#8217;s functions.php file.</p>
<pre><code>
function add_rich_snippets(){
  if( is_page() || is_single() || is_author() ) {
    echo render_rich_snippets_for_pages();
  }
}
add_action(&#039;x_before_the_content_end&#039;, &#039;render_rich_snippets_for_pages&#039;);</code></pre>
<p>We certainly appreciate the feedback! This is something we can add to our list of feature requests. This way it can be taken into consideration for future development. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive. Thanks!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1061144</guid>
					<title><![CDATA[Reply To: Blog excerpts showing wrong information]]></title>
					<link>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1061144</link>
					<pubDate>Mon, 27 Jun 2016 09:02:00 +0000</pubDate>
					<dc:creator>flyingkiwi</dc:creator>

					<description>
						<![CDATA[
						<p>No worries! </p>
<p>Am I inserting this as a replacement to the existing code or in addition to? </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1061159</guid>
					<title><![CDATA[Reply To: Blog excerpts showing wrong information]]></title>
					<link>https://theme.co/archive/forums/topic/blog-excerpts-showing-wrong-information/#post-1061159</link>
					<pubDate>Mon, 27 Jun 2016 09:14:05 +0000</pubDate>
					<dc:creator>Rue Nel</dc:creator>

					<description>
						<![CDATA[
						<p>Hello There,</p>
<p>The code would be useful if you opted to use the code provided from WordPress.org support so that you will no longer edit page.php, single.php or author.php. The full code should be like this:</p>
<pre><code>// Render Rich Snippets for pages
// =============================================================================
function render_rich_snippets_for_pages( $title_tag = TRUE, $author_tag = TRUE, $updated_tag = TRUE ) {
  global $smof_data;

  $html = &#039;&#039;;

  if( ! $smof_data[&#039;disable_date_rich_snippet_pages&#039;] ) {

    if( $title_tag ) {
      $html = &#039;&lt;span class=&quot;entry-title&quot; style=&quot;display: none;&quot;&gt;&#039; . get_the_title() . &#039;&lt;/span&gt;&#039;;
    }

    if( $author_tag ) {
      ob_start();
      the_author_posts_link();
      $author_post_link = ob_get_clean();
      $html .= &#039;&lt;span class=&quot;vcard&quot; style=&quot;display: none;&quot;&gt;&lt;span class=&quot;fn&quot;&gt;&#039; . $author_post_link . &#039;&lt;/span&gt;&lt;/span&gt;&#039;;
    }

    if( $updated_tag ) {
     $html .= &#039;&lt;span class=&quot;updated&quot; style=&quot;display:none;&quot;&gt;&#039; . get_the_modified_time( &#039;c&#039; ) . &#039;&lt;/span&gt;&#039;;
    }

  }
  return $html;
}
// =============================================================================

// Display the rich snippets in pages, single post or author archive
// =============================================================================
function add_rich_snippets(){
  if( is_page() || is_single() || is_author() ) {
    echo render_rich_snippets_for_pages();
  }
}
add_action(&#039;x_before_the_content_end&#039;, &#039;render_rich_snippets_for_pages&#039;);
// =============================================================================</code></pre>
<p>Hope this helps. Please let us know how it goes.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

