Hentry Not Working

tried adding the following code to www.dorsetphotoevent.co.uk but getting lots of pages without author or updated and would like to fix it

function add_suf_hatom_data($content) {
	$t      = get_the_modified_time('F jS, Y');
	$author = get_the_author();
	$title  = get_the_title();
	
	if (is_page() || is_home() || is_singular() || is_archive() ) {
		$content .= '<div class="hatom-extra" style="display:none;visibility:hidden;"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>';
	}
	
	return $content;
}
add_filter('the_content', 'add_suf_hatom_data');
add_filter('the_excerpt', 'add_suf_hatom_data');

Hi There,

Could you please tell us which pages the hentry is not appearing?

Thanks.

Every page and yes I have switched on in the themes meta settings

Hi There,

I made some random test and there’s no error. See this: https://screencast-o-matic.com/watch/cFnf09oBeK
If you could give us a sample page with error, that would help solve the issue. Yes, I can see some part of your site is not X theme but it is working on pages that I check that is X theme.

Many thanks, I had cleared cache many times, disabled caching but to no avail, looks like I should have waited a bit longer

Glad that you have managed to achieve your goal. Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.