HTML comment cause issue in functions.php script root

The functions.php is loaded before WordPress has sent the HTTP response headers. If you have raw HTML content in that file, even a HTML comment, then that will be sent immediately, triggering PHP’s built-in HTTP headers. Now, WordPress doesn’t know about this and tries to send the headers as usual. And that will cause an … Read more

Using A PHP App in WordPress

WP is different than PHP code. Content is stored in a database, and displayed via template files, which come with your theme. Which template displays your content? Take a look at the Template Hierarchy (ask the googles/bings/ducks, or look in the Codex via the link below). For instance, a page is usually displayed with a … Read more

Resize post thumbnail

Why don’t you use this add_image_size( ‘custom-thumbnail’, 300, 300, true ); in funtions.php and call it <img src=”<?php echo get_the_post_thumbnail_url(‘custom-thumbnail’); ?>”> in your page?