My themes admin login is broken I get an error message

  • ianizaguirre

    #7671

    I get this when I try to log in to my website in the wp-admin

    Warning: Cannot modify header information – headers already sent by (output started at /home/burger8/public_html/wp-content/themes/iamdentistry/functions.php:34) in /home/burger8/public_html/wp-includes/pluggable.php on line 876

    Is there anyway to fix this

    Admin

    Syahir Hakim

    #38953

    What’s in iamdentistry/functions.php on line 34?

    ianizaguirre

    #38954

    copy and pasted

    <?php
    /**
    * Modify the footer copyright text
    */
    function at_register_sidebars() {

    $max_columns = 3; // change to number of columns you want to add to your footer
    $text_domain = 'appthemes'; // the text domain to use for translating the strings

    foreach ( range(1, $max_columns) as $number ) {
    $sidebar_name = sprintf(__('Footer Column %d', $text_domain), $number );
    register_sidebar( array(
    'name' => $sidebar_name,
    'description' => '',
    'before_widget' => '<li id="%1$s" class="widget %2$s">',
    'after_widget' => '</li>',
    'before_title' => '<h2 class="widgettitle">',
    'after_title' => '</h2>',
    ) );
    }
    }
    add_action( 'wp_loaded', 'at_register_sidebars' );
    /**
    * Add custom classes for easier styling
    */
    function my_body_class( $classes ) {
    if ( is_singular() && ! have_comments() ) $classes[] = 'nocomment';

    return $classes;
    }
    add_filter( 'body_class', 'my_body_class' );
    ?>

    <?php
    // function my_scripts_method() {
    // wp_enqueue_script(
    // 'custom-script',
    // get_stylesheet_directory_uri() . '/js/jquery.fancybox.js',
    // array( 'jquery' )
    // );
    // }

    // add_action( 'wp_enqueue_scripts', 'my_scripts_method' );
    ?>

    <?php
    /**
    * Register with hook 'wp_enqueue_scripts', which can be used for front end CSS and JavaScript
    */
    // add_action( 'wp_enqueue_scripts', 'fancybox_add_my_stylesheet' );

    // /**
    // * Enqueue plugin style-file
    // */
    // function fancybox_add_my_stylesheet() {
    // // Respects SSL, Style.css is relative to the current file
    // wp_register_style( 'fancybox-style', get_stylesheet_directory_uri() . '/js/jquery.fancybox.css');
    // wp_enqueue_style( 'fancybox-style' );
    // }
    ?>
    Admin

    Syahir Hakim

    #38955

    The empty space between this code is what causing the issue:

    ?>

    <?php

    ianizaguirre

    #38956

    Thank you so much

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.