Skip Navigation

[Resolved] Using 'the_content' but content templates not working

This support ticket is created 8 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Mattnet 8 years ago.

Assisted by: Luo Yang.

Author
Posts
#381081
2016-04-06.png

I am trying to: use content templates to display custom single-page pasts for each of my custom post types

I visited this URL: hidden link

I expected to see: featured image, post title, etc. that reside in my Single Brand content template.

Instead, I got: no content at all....just date, author and no comments yet...

worked great in a previous theme, but no this one that I paid money for (Athena Pro). Debug test wouldn't work on page with content template, only on pages with full views....in looking at php files, it appears to use 'the_content' though and trying other variations didn't work like 'get_the_content'...happy to provide temporary admin login credentials.

#381131

Dear Mattnet,

Since it is a compatibility problem, please fill below private detail box with login details and ftp access of your test site, I need test and debug it in a live website, thanks

#381432

Thanks for the details, I can login your website, please check the source codes of your theme folder \athena_pro\inc\athena.php, line 2917~2969:

function athena_add_social( $content ){ 

	

	if( is_single() ) :

	

		if( get_theme_mod('social_sharing', 'on' ) == 'off' ) : 

			return;

		endif;
...

	return $content;

}

add_filter( 'the_content', 'athena_add_social' );

This php function "athena_add_social" will add a filter in every post, output blank result when the theme option "social_sharing" is setup as "off", I suggest you contact your theme author for it, I think it should be able to return the content too.

currently, you can add some codes to remove this filter, for example, add below codes into your child theme/functions.php:

add_action( 'after_setup_theme', 'my_func' );
function my_func(){
	remove_filter( 'the_content', 'athena_add_social' );
}

Please test it, check if it is fixed or not.

#381534

Perfect fix for my needs! Thanks for looking into this! Well done.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.