Home > Net >  Getting a Syntax Error while calling the function in PHP CODE
Getting a Syntax Error while calling the function in PHP CODE

Time:01-13

I have been developing a website in wordpress and when i am fetching the functgions...the dbppwl_script() it response wbut when im trying to ru the after theme functgion it shows an syntax error related to the fucntion after_theme

 <?php
//  theme function code 

function dbpplwp_theme_setup(){
    add_theme_support('custom-logo');
    add_theme_support('title-tag');
    add_theme_support('post-thumbnails');
    add_image_size('home-featured', 680, 400, array('center','center'));
    add_theme_size('single-img', 600, 550, array('center','center'));
    add_thehe_support('automatic-feed-links');

    register_nav_menus( array(
        'primary' => _('Primary Menu','dbpplwp')
    ));
}
add_action('after_setup_theme', 'dbpplwp_theme_setup' )

function dbpplwp_scripts(){
    wp_enqueue_style('style',get_stylesheet_uri() );
};
 add_action('wp_enqueue_scripts','dbpplwp_scripts');
?>

Can anybody tell what kind of error is recurring here

CodePudding user response:

There is a typo it should be add_theme_support() not add_thehe_support on line 10. Also, in the add_image_size('home-featured', 680, 400, array('center','center')) and add_theme_size('single-img', 600, 550, array('center','center')) it should be add_image_size() instead of add_theme_size().

CodePudding user response:

You missed ; Each statement must ends up with a semicolon in PHP.

missed here : add_action('after_setup_theme', 'dbpplwp_theme_setup' )

to

add_action('after_setup_theme', 'dbpplwp_theme_setup' );
  • Related