WordPress.org

Ready to get started?Download WordPress

Forums

Auto Post Thumbnail
Add file location to wp_postmeta - meta_wp_attached_file (1 post)

  1. sophos9
    Member
    Posted 2 years ago #

    I was wondering if you can help with a query please? My website takes the thumbnail and parses it to timthumb.php using the following code

    if($values == "") {
    				$meta = get_post_thumbnail_id ($post->ID, "_thumbnail_id",true);		//get wordpres built in thumbnail value
    				if($meta) {
    					$values = "wp-content/uploads/".get_post_meta($meta, "_wp_attached_file",true);
    				}
    			}
    			if($values != "" ) {
    				$file = get_bloginfo('template_url').$values;
    				$src=get_bloginfo('template_url'); $src.="/scripts/timthumb.php?src=";
    				$src.=$values; $src.="&w=50&h=31&zc=1&q=100";

    This however passes the URL normally stored in meta _wp_attached_file to timthumb.

    Does anyone know how to update/edit this plugin so that when the image file taken from the post and created in wordpress/uploads it updates _wp_attached_file in postmeta please?

    http://wordpress.org/extend/plugins/auto-post-thumbnail/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic