Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jwesonga

    (@jwesonga)

    Figured this out:

      Create a functions.php file in the themes folder.
      Add the following to the functions.php add_theme_support( 'post-thumbnails' );
      And then modified my page.php template to have the following:
    <?php
    /*
    Template name: Page
    */
    ?>
    <?php get_header();?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div id="col1">
    <?php if (has_post_thumbnail()){
    	echo the_post_thumbnail();
    
    }
    
    ?>			</div>
      <div id="col2">
    <h1><?php the_title(); ?></h1>
                    <p>
    				<?php the_content();?>
    				</p> 
    
    		  </div>
    <?php endwhile; endif; ?>
    
    		  </div> 
    
    <?php get_footer();?>
    jwesonga

    (@jwesonga)

    Sorry figured it out, I added the add_theme_support( 'post-thumbnails' ); to my functions.php file and it sorted it out

    jwesonga

    (@jwesonga)

    I just tried that function has_post_thumbnail and got this error:

    Fatal error: Call to undefined function has_post_thumbnail() in C:\xampp\htdocs\wordpress-2.9.1\wordpress\wp-content\themes\mclabs\inner_page.php on line 11

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