• Resolved michaelware

    (@michaelware)


    For some reason the last part of this php file is displaying on the page. Namely = ?>

    How can I hide it from displaying both on the page and within my print section of my css?

    <title><?php
    $values = get_post_custom( $post->ID );
    $seo_title = isset( $values[‘seo_title’] ) ? esc_attr( $values[‘seo_title’][0] ) : ”;
    $seo_desc = isset( $values[‘seo_desc’] ) ? esc_attr( $values[‘seo_desc’][0] ) : ”;
    $seo_keywords = isset( $values[‘seo_keywords’] ) ? esc_attr( $values[‘seo_keywords’][0] ) : ”;
    if($seo_title != null && $seo_title != ”) {
    echo $seo_title . ‘</title>’;
    } else {
    echo bloginfo(“blogname”) . ‘ | ‘;
    echo the_title() . ‘</title>’;
    }
    if($seo_desc != null && $seo_desc != ”) {
    echo ‘<meta name=”description” content=”‘ . $seo_desc . ‘” />’;
    }
    if($seo_keywords != null && $seo_keywords != ”) {
    echo ‘<meta name=”keywords” content=”‘ . $seo_keywords . ‘” />’;
    } ?>

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

The topic ‘how to hide "?>" in the header.php file’ is closed to new replies.