Support » Themes and Templates » Using featured image with Allure theme

  • Resolved montygothic



    I’m using the Allure theme and after researching the codex docs I’m still having trouble getting the featured images to post home page.

    I have added the following lines to function.php files:

    `add_theme_support( ‘post-thumbnails’ );

    has_post_thumbnail( $post_id );

    Here is a link to the page

    Any advice will be well received.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hey, I’ve tried to add the following but still no avail. I know I’m on the right track, any suggestions of tweaking this is appreciated.

    This to functions.php
    <?php add_theme_support( 'post-thumbnails' ); ?>


    This to the home.php page.

    <?php if(function_exists('the_post_thumbnail')) { ?>
    <?php if(get_the_post_thumbnail() != "") { ?>
    <?php the_post_thumbnail(array(150,150), array('class' => 'alignleft')); ?>
    <?php } ?>
    <?php } ?>

    This is what I would do:
    I’d also ad this to the functions.php:

    add_theme_support( ‘post-thumbnails’ );

    If you have an thumbnail set I use the following code to load it inside the loop:

    the_post_thumbnail( ‘large’, array(‘class’ => ‘your_class_name_for_thumbnail_images’) );

    OR (if you need large images)

    <?php the_post_thumbnail( ‘thumbnail’, array(‘class’ => ‘your_class_name_for_large_images’) ); ?>

    Hope this helps

    Thanks edriessen, I tried this and the result is
    The image now appears! but I can’t get it to appear in the homebox “Quadrant today”.

    This site is using the same theme,

    They seem to have it sussed, anyone know how they did it?

    I fixed it now, phew.

    In functions.php I added

    add_theme_support( ‘post-thumbnails’ );

    Then I deleted some code which related to a thumbnail plugin specific to life before WP 2.9

    And replaced it with <?php the_post_thumbnail( ‘your_class’ ); ?>

    Last step was to add the following code to style.css

    .wp-post-image {
    float: left;
    margin: 0 10px 0 0;

    Got there in the end

    Good to know it works now

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Using featured image with Allure theme’ is closed to new replies.