Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   [SOLVED] Featured image shows the first image included in the post. (http://forum.bytesforall.com/showthread.php?t=18574)

Auteri Oct 5, 2012 05:12 AM

[SOLVED] Featured image shows the first image included in the post.
 
When I have no featured image with my post the Montezuma theme will show the first image included in the post itself. But I don't want that. How can I make sure that the featured image is only showing when allowed?

juggledad Oct 5, 2012 05:36 AM

currently there is no way to do that. The bfa_thumb() function
Quote:

If a "Featured Image" was set for the post, that one will be used. Else, the first attached/inserted local image in the post will be used. Else the first local image URL will be used. External images will not be used. Will create thumbnail on the fly if it does not exist. You can use different values for width, height and crop (true/false) in each post format template. Possible values for $link: 'permalink' (links to post) or empty (not linked). TODO: Add 'fullsize' to link to full size version of image.
I have created an RFE to ask for an option to do what you want, but for now you eithor get a featured image on all posts or none. See RFE: add option to bfa_thumb() to control if you want an automatic image built

Auteri Oct 5, 2012 07:15 AM

I modified the thumb.php in /wp-content/themes/montezuma/includes and I think it works. At least my site still works and no faulty featured images anymore.

I removed line 58 to 64.
} elseif ( bfa_has_attachment() ) {
$thumb = bfa_get_first_attachment_id();
$hasthumb = TRUE;
} elseif( bfa_has_img_src() ) {
$thumb = bfa_get_first_img_src();
$hassrc = TRUE;

and saved the thumb.php.

:)


All times are GMT -6. The time now is 02:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.