如果在wordpress页面中是其他的 - 总是一个或另一个

Have a page showing videos from a custom post type. on the video upload page, users can decide if they want a video thumbnail, or their own photo.

I let them choose this with a radio button. variable is assigned as author or video (video as default).

I am trying to set it to display author when custom field = author and thumbnail when custom field = video.

all videos revert to the author thumbnail... maybe I'm missing something obvious...

<?php  
    if (have_posts()) : while (have_posts()) : the_post();
        $video_post_type = get_custom_fields('video_post_type');
    endwhile;
    else:
    endif; 
?>

    <?php 

    <?php 
    $x = 1;
    $loop = new WP_Query( array ( 
        'post_type' => 'video',
        'posts_per_page' => 12,
        'paged' => get_query_var( 'paged')
    ) );
    if ($loop->have_posts()) : while ($loop->have_posts()) :
    $loop->the_post();
    $do_not_duplicate = $post->ID;

    $video_url=get_post_custom_values('video-url');
    $thumb_url=null;
$pic_choice=get_post_custom_values('video-image');


    if(strpos($video_url[0], 'youtube.com')!==false){ 

        $url_string = parse_url($video_url[0], PHP_URL_QUERY);
        parse_str($url_string, $args);
        $vid_id = isset($args['v']) ? $args['v'] : false;

        if($vid_id){
            $thumb_url='http://img.youtube.com/vi/'.$vid_id.'/hqdefault.jpg';
        }

    }

    if(strpos($video_url[0], 'vimeo.com')!==false){

        $vid_id = basename($video_url[0]);
        $thumb_url = getVimeoInfo($vid_id,"thumbnail_medium");

    }        

    if(!$thumb_url){
        $thumb_url= get_bloginfo('template_directory').'/img/vid-thumb.png'; 
    }

    ?>
    <div class="video-thumb">
    <a href="<?php custom_fields('video-url'); ?>">
    <?php if ($pic_choice = "author"):?>
    <?php userphoto_the_author_photo();?>
    <?php else:?>
    <img src="<?php echo $thumb_url; ?>" width="200" height="150"/>
    <?php endif; ?>
       </a> 

        <div style="text-align:center;" class="video-meta">
            <a href="<?php custom_fields('video-url'); ?>"><strong>
        <?php the_title(); ?></strong></a> <br/>
            <span class="vid-date"><?php custom_fields('video-date'); ?></span> <br/>
            <span class="vid-date"><?php custom_fields('video-speaker'); ?></span> 
    <br/>
    <span class="vid-date"><?php custom_fields('video-image'); ?></span> <br/>
        </div>

    </div>        


    <?php 
        endwhile;
        else:
        endif; 
    ?>


    <div class="page-nav"> 
        <?php wp_pagenavi(array( 'query' => $loop ) ); ?>   
    </div> 

<?php if ($pic_choice = "author"):?>

should be:

<?php if ($pic_choice == "author"):?>

Assignment operator vs Comparision operator