Community Forums › Forums › Archived Forums › General Discussion › [Issue] Cannot modify header information
- This topic has 1 reply, 2 voices, and was last updated 8 years, 10 months ago by Christoph.
-
AuthorPosts
-
June 18, 2015 at 11:54 am #156227aifristMember
hello,
i'm new in genesis framework, i try to make my own theme with "Genesis Sample Theme" but i have problem with my code :/
i can't login to my wordpress with "Genesis Sample Theme" , and i have this issue
--------------------------------------------------------------------------------------------------------------------------------------------
Warning: Cannot modify header information - headers already sent by (output started at /home/mindrevc/public_html/wp-content/themes/genesis-sample/functions.php:1) in /home/mindrevc/public_html/wp-login.php on line 425Warning: Cannot modify header information - headers already sent by (output started at /home/mindrevc/public_html/wp-content/themes/genesis-sample/functions.php:1) in /home/mindrevc/public_html/wp-login.php on line 438
--------------------------------------------------------------------------------------------------------------------------------------------i dont know what happen but this my functions.php
--------------------------------------------------------------------------------------------------------------------------------------------
<?php
//* Start the engine
include_once( get_template_directory() . '/lib/init.php' );//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', 'Genesis Sample Theme' );
define( 'CHILD_THEME_URL', 'http://www.studiopress.com/' );
define( 'CHILD_THEME_VERSION', '2.1.2' );//* Enqueue Google Fonts
add_action( 'wp_enqueue_scripts', 'genesis_sample_google_fonts' );
function genesis_sample_google_fonts() {wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:300,400,700', array(), CHILD_THEME_VERSION );
}
//* Add HTML5 markup structure
add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) );//* Add viewport meta tag for mobile browsers
add_theme_support( 'genesis-responsive-viewport' );//* Add support for custom background
add_theme_support( 'custom-background' );//* Add support for 3-column footer widgets
add_theme_support( 'genesis-footer-widgets', 3 );/** My Editing */
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
add_action( 'genesis_entry_header', 'genesis_post_info', 10 );remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_header_right', 'genesis_do_nav', 11 );//* Customize the entry meta in the entry header (requires HTML5 theme support)
add_filter( 'genesis_post_info', 'sp_post_info_filter' );
function sp_post_info_filter($post_info) {
$post_info = '[post_date] oleh [post_author_posts_link] [post_comments] [post_edit]';
return $post_info;
}/** Support for various Image sizes */
add_image_size('post-image', 640, 333, TRUE );//* Add features image on single post
add_action( 'genesis_entry_header', 'single_post_featured_image', 15 );
function single_post_featured_image() {
if ( ! is_singular( 'post' ) )
return;
$img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );
printf( '%s', get_permalink(), the_title_attribute( 'echo=0' ), $img );
}// Register responsive menu script
add_action( 'wp_enqueue_scripts', 'prefix_enqueue_scripts' );
/**
* Enqueue responsive javascript
* @author Ozzy Rodriguez
* @todo Change 'prefix' to your theme's prefix
*/
function prefix_enqueue_scripts() {
wp_enqueue_script( 'prefix-responsive-menu', get_stylesheet_directory_uri() . '/lib/js/responsive-menu.js', array( 'jquery' ), '1.0.0', true ); // Change 'prefix' to your theme's prefix
}//* Modify the length of post excerpts
add_filter( 'excerpt_length', 'sp_excerpt_length' );
function sp_excerpt_length( $length ) {
return 50; // pull first 50 words
}
//* Modify the Genesis content limit read more link
add_filter( 'get_the_content_more_link', 'sp_read_more_link' );
function sp_read_more_link() {
return '... <p>Lanjut Baca ›</p>';
}//* Modify breadcrumb arguments.
add_filter( 'genesis_breadcrumb_args', 'sp_breadcrumb_args' );
function sp_breadcrumb_args( $args ) {
$args['home'] = 'Home';
$args['sep'] = ' / ';
$args['list_sep'] = ', '; // Genesis 1.5 and later
$args['prefix'] = '<div class="breadcrumb">';
$args['suffix'] = '</div>';
$args['heirarchial_attachments'] = true; // Genesis 1.5 and later
$args['heirarchial_categories'] = true; // Genesis 1.5 and later
$args['display'] = true;
$args['labels']['prefix'] = ' ';
$args['labels']['author'] = 'Archives for ';
$args['labels']['category'] = 'Archives for '; // Genesis 1.6 and later
$args['labels']['tag'] = 'Archives for ';
$args['labels']['date'] = 'Archives for ';
$args['labels']['search'] = 'Search for ';
$args['labels']['tax'] = 'Archives for ';
$args['labels']['post_type'] = 'Archives for ';
$args['labels']['404'] = 'Not found: '; // Genesis 1.5 and later
return $args;
}//* Change the footer text
add_filter('genesis_footer_creds_text', 'sp_footer_creds_filter');
function sp_footer_creds_filter( $creds ) {
$creds = 'Made With <span class="dashicons dashicons-heart"></span> MindR [footer_copyright] All Right Reserved';
return $creds;
}//* Add support for post formats
add_theme_support( 'post-formats', array(
'aside',
'audio',
'chat',
'gallery',
'image',
'link',
'quote',
'status',
'video'
) );
--------------------------------------------------------------------------------------------------------------------------------------------can you help me please i confused , what must i do @.@ ?
June 19, 2015 at 11:08 pm #156899ChristophMemberHi,
could you please post your code again using the code tags? (second button from the right on top of the editor)
The editor formats
'
into´
or. I didn't get an error after I replaced the
´or
but I can't tell if you had one in your code.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.