Warning: Cannot modify header information
-
Please guys it’s urgent . When I want to enter in my admin account of wordpress, the following error is coming.
Cannot modify header information – headers already sent by (output started at /wp-content/themes/lifestyle-pro/lib/my_functions.php.php:1) in /wp-includes/pluggable.php on line 1173
I tried to remove the spaces in my_function.php.php.
I am presenting you it’s code. Please help me out as I am not getting the way out.
<?php/**
* My Custom Functions
*/
//* Customize the credits
add_filter( ‘genesis_footer_creds_text’, ‘sp_footer_creds_text’ );
function sp_footer_creds_text() {
echo ‘<div class=”creds”><p>’;
echo ‘Copyright ? ‘;
echo date(‘Y’);
echo ‘ · mydomain_name ‘;
echo ‘</p></div>’;
}
//* Customize the post info function
add_filter( ‘genesis_post_info’, ‘sp_post_info_filter’ );
function sp_post_info_filter($post_info) {
if ( !is_page() ) {
$post_info = ”;
return $post_info;
}}
//* Customize the post meta function
add_filter( ‘genesis_post_meta’, ‘sp_post_meta_filter’ );
function sp_post_meta_filter($post_meta) {
if ( !is_page() ) {
$post_meta = ”;
return $post_meta;
}}
//* Add support for post formats
add_theme_support( ‘post-formats’, array(
‘aside’,
‘audio’,
‘chat’,
‘gallery’,
‘image’,
‘link’,
‘quote’,
‘status’,
‘video’
) );
//* Modify the length of post excerpts
add_filter( ‘excerpt_length’, ‘sp_excerpt_length’ );
function sp_excerpt_length( $length ) {
return 31; // pull first 31 words
}
// Changing excerpt more
function new_excerpt_more($more) {
global $post;
return ‘… ID) . ‘”>’ . ‘Read More ?’ . ‘‘;
}
add_filter(‘excerpt_more’, ‘new_excerpt_more’);
//* Add new image sizes
add_image_size(‘single-thumbnail’, 580, 145, TRUE);
add_action ( ‘genesis_entry_header’, ‘sk_show_featured_image_single’ );
function sk_show_featured_image_single() {
if ( is_single() && has_post_thumbnail() ) {
echo ‘<div class=”single-thumbnail”>’;
genesis_image( array( ‘size’ => ‘single-thumbnail’ ) );
echo ‘</div>’;
}
}
- The topic ‘Warning: Cannot modify header information’ is closed to new replies.