Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7802727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:20:31+00:00 2026-06-02T01:20:31+00:00

I can’t seem to get rid of this error- Parse error: syntax error, unexpected

  • 0

I can’t seem to get rid of this error-

Parse error: syntax error, unexpected T_STRING in /home/content/97/9225097/html/wp-content/themes/grisaille/functions.php on line 154

EDIT: I tried removing the line 154 entirely, and still received the exact same error

Full functions.php:

<?php


if ( ! isset( $content_width ) )
    $content_width  = '590';


/**
* Add Menu Support
**/

add_theme_support('automatic-feed-links');
register_nav_menu('main', 'Main Nav');

/**
* Add editor style - recommended according to Theme-Check
**/
add_editor_style('editor-style.css');


/**
* Add custom background with custom background colour fix 
* as shown here: http://devpress.com/blog/custom-background-fix-for-theme-developers/
**/

add_custom_background( 'grisaille_custom_background_callback' );

function grisaille_custom_background_callback() {

    /* Get the background image. */
    $image = get_background_image();

    /* If there's an image, just call the normal WordPress callback. We won't do anything here. */
    if ( !empty( $image ) ) {
        _custom_background_cb();
        return;
    }

    /* Get the background color. */
    $color = get_background_color();

    /* If no background color, return. */
    if ( empty( $color ) )
        return;

    /* Use 'background' instead of 'background-color'. */
    $style = "background: #{$color};";

?>
<style type="text/css">body { <?php echo trim( $style ); ?> }</style>
<?php

}

/**
* Add custom header
**/

define('HEADER_TEXTCOLOR', '334759');
define('HEADER_IMAGE', ''); // %s is the template dir uri
define('HEADER_IMAGE_WIDTH', 960); // use width and height appropriate for your theme
define('HEADER_IMAGE_HEIGHT', 200);

// gets included in the site header

function grisaille_header_style() {

    ?><style type="text/css">
        #site-title {
            background: url(<?php header_image(); ?>) 0 0 no-repeat;
            min-height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
            margin: 20px 0;          
        }
        #site-title h1 a {
            color:#<?php header_textcolor(); ?> ;
            min-height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
        }
        #site-description {
            color:#<?php header_textcolor(); ?> ;
        }
        <?php if ( 'blank' == get_header_textcolor() ) { ?>
        #site-title h1 {
            padding: 0;
        }
        #site-title h1 a  {
            display:block;
            text-indent:-99999px;
        }
        #site-description {
            display: none;
            text-indent:-99999px;
        }

<?php } ?>
</style>
<?php
}
// gets included in the admin header
function grisaille_admin_header_style() {
    ?>
        <style type="text/css">
            @font-face {
            font-family: 'WoodenNickelBlackRegular';
    src: url('<?php echo get_template_directory_uri(); ?>/type/WOODENNI-webfont.eot?') format('eot'),
         url('<?php echo get_template_directory_uri(); ?>/type/WOODENNI-webfont.woff') format('woff'),
         url('<?php echo get_template_directory_uri(); ?>/type/WOODENNI-webfont.ttf') format('truetype'),
         url('<?php echo get_template_directory_uri(); ?>/type/WOODENNI-webfont.svg#webfontDYhQeecV') format('svg');
    font-weight: normal;
    font-style: normal;
}

        #headimg h1 {
            margin-bottom: 0;
        }
        #headimg h1 a{
            font:80px WoodenNickelBlackRegular, "Times New Roman", Times, serif;
            padding-left: 30px;
            text-transform:uppercase;
            text-decoration:none;
            width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
            height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
        }
        #desc {
            font:26px  Geneva, Verdana, sans-serif;
            padding-left: 30px;
        }
    </style><?php
}
add_custom_image_header('grisaille_header_style', 'grisaille_admin_header_style');

/**
* Change Excerpt length
**/
function grisaille_new_excerpt_length($length) {
    return 20;
}
add_filter('excerpt_length', 'grisaille_new_excerpt_length');

/**
* Change excerpt [...] to something else
**/

function grisaille_new_excerpt_more($more) {
    global $post;
    return ' ... <br /><a class="more-link" href="'. get_permalink($post->ID) . __('">keep reading</a>', 'grisaille');
}
add_filter('excerpt_more', 'grisaille_new_excerpt_more');

/**
* Thumbnail support
**/

add_theme_support( 'post-thumbnails' );  
set_post_thumbnail_size( 590, 275, true ); // 590 pixels wide by 275 pixels tall, hard crop mode
add_image_size( 'following-post-thumbnails', 250, 200, true ); // 250 pixels wide by 200 pixels tall, hard crop mode

// THIS LINKS THE THUMBNAIL TO THE POST PERMALINK
add_filter( 'post_thumbnail_html', 'grisaille_post_image_html', 10, 3 );
function grisaille_post_image_html( $html, $post_id, $post_image_id ) {

    $html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '">' . $html . '</a>';

    return $html;
}

/**
* Google font API - adding Ubuntu font
**/
function grisaille_enqueue_scripts_styles() {
         wp_enqueue_style( 'Marvel', 'http://fonts.googleapis.com/css?family=Marvel');                                                 
}     
add_action('wp_enqueue_scripts', 'grisaille_enqueue_scripts_styles'); 

/**
* checks if the visitor is browsing either a page or a post and adds the 
* JavaScript required for threaded comments if they are
**/
function grisaille_queue_js(){
  if (!is_admin()){
    if ( is_singular() AND comments_open() AND (get_option('thread_comments') == 1))
      wp_enqueue_script( 'comment-reply' );
  }
}
add_action('get_header', 'grisaille_queue_js');

/**
* register_sidebar()
**/

add_action( 'widgets_init', 'grisaille_register_sidebars' );

function grisaille_register_sidebars() {

    /* Register the 'primary' sidebar. */
    register_sidebar(
        array(
            'id' => 'grisaillesidebar',
            'name' => __( 'Grisaille Sidebar', 'grisaille' ),
            'description' => __( 'Main right sidebar.', 'grisaille' ),
            'before_widget' => '<div class="sidebaritem">',
            'after_widget' => '</div>',
            'before_title' => '<h3 class="widget-title">',
            'after_title' => '</h3>'
        )
    );

}   

/**
* Load the Theme Options Page for social media icons
*/
require_once ( get_template_directory() . '/inc/theme-options.php' );


/**
* Loads the theme's translated strings
*/

add_action('after_setup_theme', 'grisaille_language_theme_setup');
function grisaille_language_theme_setup(){
    load_theme_textdomain('grisaille', get_template_directory() . '/lang');
}   
?>

Lines 149 – 165

    /**
* Thumbnail support
**/

add_theme_support( 'post-thumbnails' );  
set_post_thumbnail_size( 590, 275, true ); // 590 pixels wide by 275 pixels tall, hard crop mode
add_image_size( 'following-post-thumbnails', 250, 200, true ); // 250 pixels wide by 200 pixels tall, hard crop mode

// THIS LINKS THE THUMBNAIL TO THE POST PERMALINK
add_filter( 'post_thumbnail_html', 'grisaille_post_image_html', 10, 3 );
function grisaille_post_image_html( $html, $post_id, $post_image_id ) {

    $html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '">' . $html . '</a>';

    return $html;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T01:20:32+00:00Added an answer on June 2, 2026 at 1:20 am

    There is nothing wrong with line 154. I was going through the code and the one line I saw that was wonky was a line in the grisaille_new_excerpt_more function. The way the string concatenation is done appears incorrect, however it did compile via commandline on my test box, but it may be causing a problem when co-mingled with wordpress(?) code.

    Try changing this:

    return ' ... <br /><a class="more-link" href="'. get_permalink($post->ID) . __('">keep reading</a>', 'grisaille');
    

    To this:

    return ' ... <br /><a class="more-link" href="'. get_permalink($post->ID) . '">' . __('keep reading', 'grisaille') . '</a>'; 
    

    Also, the $more variable you are passing to grisaille_new_excerpt_more is not even being used, just fyi.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can't seem to get the Back Button to appear in a UINavigationController flow. I
Can somebody tell me how to get mod_rewrite to rename this: our-work-section.php?id=3&title=something to our-work-section/something/3
Can I get a 'when to use' for these and others? <% %> <%#
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Can I run this in a Windows command prompt like I can run it
Can anybody help me? What should be the datatype for this type -07:00:00 of
can someone explain why the compiler accepts only this code template<typename L, size_t offset,
Can't figure out how to do this in a pretty way : I have
Can MOSS integrate and get user profiles from multiple Active Directory and/or LDAP stores?
Can anyone tell me what i am doing wrong? I am trying to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.