WordPress.org

Ready to get started?Download WordPress

Forums

Thumbnail For Excerpts
[resolved] Posts without a pic? (4 posts)

  1. deesnay
    Member
    Posted 2 years ago #

    Too bad that posts without a picture still have a placeholder for an empty pic in the excerpts.
    Otherwise, it's great!

    http://wordpress.org/extend/plugins/thumbnail-for-excerpts/

  2. markifornia
    Member
    Posted 2 years ago #

    There seems to be no other plugin that works as great as this one. I modified the code so that the default pic won't show up at all (if there is no thumbnail in the post):

    I don't have the exact line numbers, but if you control find, you should be able to figure it out.

    I've already implemented this and tested:

    /*$default=(get_settings('tfe_default_image')==''?'yes':get_settings('tfe_default_image'));*/
    	$default = 'no';
    
    			if($withlink=="yes")
    	if($default=='no' && $noimg==true){
    				$plus='';
    	} else {
    				$plus='<a href="'.get_permalink().'">'.$post_thumbnail.'</a>';
    	}
    			else
    				$plus=$post_thumbnail;
    	}

    If there are any errors generated by this that I'm not aware of or have not encountered, please let me know.

    Thanks!

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum's parser.]

  3. cscottb
    Member
    Posted 1 year ago #

    I just select the "no" dropdown option next to "Default Image:" in the Thumbnail for Excerpts settings and had never had an image show up for posts without images.

  4. deesnay
    Member
    Posted 1 year ago #

    @cscottb: That works fine indeed! :) Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.