badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Reply To: Need featured image to display on single posts

#45997
david.danaan
Participant

This is code I copied directly from this forum and modified for my function, instructing how to unhook functions:

/ Unhook 
function unhook_thematic_functions() {
// Don't forget the position number if the original function has one

remove_action('attitude_loop_content','attitude_theloop_for_single', 10);

}
add_action('init','unhook_thematic_functions'); // removes the header content by using hook attitude_header

add_action('attitude_loop_content','attitude_child_theloop_for_single', 10);

// Add function to display featured image in single post template

It is not only calling the_content twice, it’s doing something to the header content and breaking the editing interface so I can’t add new posts – I get an error message ‘cannot modify header’. It also adds a <? to the beginning of each post tag, if that helps. Did I use the wrong action hook for this function? Please advise. I have to remove this modification temporarily from my child theme so I can add new content.

Thanks.