Adding theme support for post formats – I get some errors
-
Hi,
I’ve been trying to get wordpress to offer me the option between “standard” and “link” posts.I’m using my own custom theme, not based on any default one.
I managed to get it working in my category template using advice from this thread. Yay.
But, in order to be able to select a post format in the admin panel, as I understand, I also need to add
<?php add_theme_support( 'post-formats', array( 'standard', 'link' ) ); ?>to functions.php.
This works, BUT, with errors. It shows me the option to select between “link” and “standard” formats, but when I save the post, I get this error:
Warning: Cannot modify header information – headers already sent by (output started at /home/public_html/wp-content/themes/2015/functions.php:3) in /home/public_html/wp-admin/post.php on line 237
Warning: Cannot modify header information – headers already sent by (output started at /home/public_html/wp-content/themes/2015/functions.php:3) in /home/public_html/wp-includes/pluggable.php on line 1196
The post gets saved correctly in spite of the error, but it is annoying to keep getting it on every content update.
Is there something else I need to do to get this working right?
I have read about post formats and adding theme support in the codex but I’m none the wiser.Here’s my functions.php:
http://pastebin.com/yrXZUqKDAny help appreciated!
The topic ‘Adding theme support for post formats – I get some errors’ is closed to new replies.