• Hi
    I’m new to WordPress and am currently trying to convert my own website https://www.newforestwalker.co.uk to a WordPress site as preparation for using WordPress as a tool for some of my customers. The WordPress site in development is at https://www.newforestwalker.co.uk/wp using a custom theme (still under development).

    I want to use thumbnails on my frontpage for the list of posts and have added it using the add_theme_support(‘post-thumbnails’) command in a functions.php file. This, as expected, gave me a Set Feature Image option in the Edit Post area of the Dashboard. However, in finding out how to do this, I see that other people, once having added a featured image, see the image in the Dashboard and also a Remove Featured Image option.

    I don’t see either the image or the Remove option in the Dashboard and, if you look at the home page https://www.newforestwalker.co.uk/wp, you’ll see that the first post actually has two thumbnails, one visible, one not there but the holder is, where I tried to change the image to a different path and found I had to re-add it.

    Is there another command that I need to add to the functions.php to achieve full functionality? I’ve searched the forum and looked at the Codex and can’t find that anyone else has encountered this problem, so I must be missing something very simple.

    Any help greatly appreciated!

    Thanks
    Rowena

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter NFWRo

    (@nfwro)

    Hi
    Still haven’t found the answer to this problem. Could anyone point me in the right direction?

    Thanks
    Rowena

    One image is coming from the themes folder:
    ‘wp/wp-content/themes/nfw/images/thumbs/snow_tree_thumb.jpg’

    The other:
    ‘wp/images/thumbs/snow_tree_thumb.jpg’

    The featured images are normally in the folders ‘\wp-content\uploads\yyyy\mm\’, so not sure what support you have added?

    Try in your functions.php file:

    // This theme uses post thumbnails
    add_theme_support( 'post-thumbnails' );
    
    // This is my thumbnail size
    set_post_thumbnail_size( 113, 150, true );

    To call the image with a condition left aligned in the loop with the post excerpt()

    <?php /* Add a conditional image and excerpt output */ ?>
    <?php if(has_post_thumbnail()): // Start the condition ?>
    	<div class="alignleft">
    		<?php the_post_thumbnail(); ?>
    	</div>
    	<?php the_excerpt(); ?>
    <?php else : // Offer an alternative ?>
    	<?php the_content() ); ?>
    <?php endif; // end the condition ?>

    the_content() may be different in your theme with a ‘more..’ call

    Adapted this from twenty ten try in your style.css

    .entry img.alignleft {
    	display: inline;
    	float: left;
    	margin-right: 24px;
    	margin-top: 4px;
    }

    You may need to re-name and re-upload your featured image as WordPress will not create retrospective images when you change settings.

    HTH

    David

    Thread Starter NFWRo

    (@nfwro)

    Hi David

    Thanks so much for your help. For reasons I couldn’t quite get to grips with, I had to remove the

    <?php else : // Offer an alternative ?>
    <?php the_content() ); ?>
    <?php endif; // end the condition ?>

    parts of the code because the page crashed (View>Source simply display the base HTML tags, HTML HEAD and BODY and nothing else) but I couldn’t see what might have been incorrect in the syntax. Any ideas?

    I hadn’t realised that it mattered where the images were stored – does that go for all images in WordPress?

    Thanks so much for your help

    Rowena

    Ooops!

    <?php the_content() >)< ; ?>

    <?php the_content(); ?>

    The featured image would be stored in the page meta, and WordPress would be looking at the media folders for the image links.

    HTH

    David

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Unable to Remove Featured Image’ is closed to new replies.