• Hi Everybody, I hope all of you are doing great!

    I was trying to customize a ad block on the header of my site, and I got the following error once I tried to update the Custom-Header file:

    Parse error: syntax error, unexpected ‘<‘ in /home/locuraex/public_html/wp-content/themes/colormag/inc/custom-header.php on line 44

    I tried to undo the changes I had made and even downloaded the original code, but it did not allow me to do anything and continues to give me the same error.

    Can someone please help me? Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • php statements begin with <?php maybe you have spaces between the < and the question mark or it could be an html code mixed into your php statements. The easiest way to figure it out is to open the custom-header.php file in an editor and look for the error at line 44. Without seeing the code for your custom-header.php file The best we can do is guess.

    If you can post the code it would help.

    Thread Starter locuraexadmin1

    (@locuraexadmin1)

    Aqui les dejo el codigo, a ver si me pueden ayudar:

    <?php
    /**
    * Implements a custom header for ColorMag.
    * See http://codex.wordpress.org/Custom_Headers
    *
    * @package ThemeGrill
    * @subpackage ColorMag
    * @since ColorMag 1.0
    */

    /**
    * Setup the WordPress core custom header feature.
    */
    function colormag_custom_header_setup() {
    add_theme_support( ‘custom-header’, apply_filters( ‘colormag_custom_header_args’, array(
    ‘default-image’ => ”,
    ‘header-text’ => ”,
    ‘default-text-color’ => ”,
    ‘width’ => 1400,
    ‘height’ => 400,
    ‘flex-width’ => true,
    ‘flex-height’ => true,
    ‘wp-head-callback’ => ”,
    ‘admin-head-callback’ => ”,
    ‘admin-preview-callback’ => ‘colormag_admin_header_image’,
    ) ) );
    }
    add_action( ‘after_setup_theme’, ‘colormag_custom_header_setup’ );

    if ( ! function_exists( ‘colormag_admin_header_image’ ) ) :
    /**
    * Custom header image markup displayed on the Appearance > Header admin panel.
    */
    function colormag_admin_header_image() {
    ?>
    <div id=”headimg”>
    <?php if ( get_header_image() ) : ?>
    <img src=”<?php header_image(); ?>” alt=”<?php bloginfo( ‘name’ ); ?>”>
    <?php endif; ?>
    </div>
    <?php
    }
    endif; // colormag_admin_header_image

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘My Page Does Not Load.’ is closed to new replies.