Support » Themes and Templates » [HELP] Featured Image on my blog

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

    (@potentweb)

    Put this in your functions.php page

    if (function_exists('add_theme_support')) {
      add_theme_support('post-thumbnails');
      add_image_size( 'post-header', 618, 400);
    }

    And in your template

    if(has_post_thumbnail()) {
            $myThumb = get_the_post_thumbnail($id, 'post-header', array('class' => 'aligncenter'));
            echo $myThumb;
        } ?>

    acunmeswew

    (@acunmeswew)

    I try that . buta my site became error

    Parse error: syntax error, unexpected ‘<‘ in /home/u761473910/public_html/wp-content/themes/averin/index.php on line 55

    in my theme already same as that , this is :

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[HELP] Featured Image on my blog’ is closed to new replies.