下記コードを実行すると、添付画像のように、フォームの先頭に空白の行が出来てしまいます。
wordpressのwelcartプラグインを使っています。
原因は、何でしょうか?
<?php /** * <meta content="charset=UTF-8"> * @package Welcart * @subpackage Welcart Default Theme */ get_header(); ?> <div id="content" class=""> <div class="catbox"> <?php if (have_posts()) : the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h1 class="item_page_title"><?php the_title(); ?></h1> <div class="storycontent"> <?php usces_remove_filter(); ?> <?php usces_the_item(); ?> <div id="itempage"> <div id="first-view"> <div id="first-view-left"> <div class="itemimg"> <a href="<?php usces_the_itemImageURL(0); ?>" <?php echo apply_filters('usces_itemimg_anchor_rel', NULL); ?>><?php usces_the_itemImage(0, 300, 300, $post); ?></a> </div> <div class="itemsubimg"> <?php $imageid = usces_get_itemSubImageNums(); ?> <?php foreach ( $imageid as $id ) : $thumb_post = get_post($imageid); $caption = $thumb_post->post_excerpt; ?> <div class="caption"> <?php echo $caption; ?> </div> <a href="<?php usces_the_itemImageURL($id); ?>" <?php echo apply_filters('usces_itemimg_anchor_rel', NULL); ?>> <?php usces_the_itemImage($id, 135, 135, $post); ?> </a> <?php endforeach; ?> </div><!-- end of itemsubimg --> </div><!-- end of first-view-left --> <div id="cart"> <form action="<?php echo USCES_CART_URL; ?>" method="post"> <div class="skuWrap"> <?php do { ?> <div class="skuBox flex"> <div class="skuName"><?php usces_the_itemSkuDisp(); ?></div> <?php if (usces_is_options()) : ?> <div><?php _e('Please appoint an option.', 'usces'); ?></div> <?php while (usces_have_options()) : ?> <div><?php usces_the_itemOptName(); ?></div> <div><?php usces_the_itemOption(usces_getItemOptName(),''); ?></div> <?php endwhile; ?> <?php endif; ?> <div class="priceWrap"> <?php if( usces_the_itemCprice('return') > 0 ) : ?> <s class="cprice"><?php usces_the_itemCpriceCr(); ?></s> <?php endif; ?> <div class="price"><?php usces_the_itemPriceCr(); ?></div> </div> <?php usces_the_itemGpExp(); ?> <div class="zaiko"><?php usces_the_itemZaikoStatus(); ?></div> <div class="quant"><?php usces_the_itemQuant(); ?></div> <div class="unit"><?php usces_the_itemSkuUnit(); ?></div> <?php if( !usces_have_zaiko() ) : ?> <div class="button"><?php echo apply_filters('usces_filters_multi_sku_zaiko_message', esc_html(usces_get_itemZaiko( 'name' ))); ?></div> <?php else : ?> <div class="button"><?php usces_the_itemSkuButton(__('Add to Shopping Cart', 'usces'), 0); ?></div> <?php endif; ?> <div colspan="5" class="error_message"><?php usces_singleitem_error_message($post->ID, usces_the_itemSku('return')); ?></div> </div><!--//skuwrap--> <?php } while (usces_have_skus()); ?> </div> <?php echo apply_filters('single_item_multi_sku_after_field', NULL); ?> <?php do_action('usces_action_single_item_inform'); ?> </form> </div><!-- end of cart --> </div><!-- end of first-view --> <?php if(usces_sku_num() === 1) : usces_have_skus(); ?> <!--1SKU--> <h2 class="item_name"><?php usces_the_itemName(); ?> (<?php usces_the_itemCode(); ?>)</h2> <div class="exp clearfix"> <div class="field"> <?php if( usces_the_itemCprice('return') > 0 ) : ?> <div class="field_name"><?php _e('List price', 'usces'); ?><?php usces_guid_tax(); ?></div> <div class="field_cprice"><?php usces_the_itemCpriceCr(); ?></div> <?php endif; ?> <div class="field_name"><?php _e('selling price', 'usces'); ?><?php usces_guid_tax(); ?></div> <div class="field_price"><?php usces_the_itemPriceCr(); ?></div> </div> <div class="field"><?php _e('stock status', 'usces'); ?> : <?php usces_the_itemZaikoStatus(); ?></div> <?php if( $item_custom = usces_get_item_custom( $post->ID, 'list', 'return' ) ) : ?> <div class="field"><?php echo $item_custom; ?></div> <?php endif; ?> <?php the_content(); ?> </div><!-- end of exp --> <form action="<?php echo USCES_CART_URL; ?>" method="post"> <?php usces_the_itemGpExp(); ?> <div class="skuform" align="right"> <?php if (usces_is_options()) : ?> <table class='item_option'> <caption><?php _e('Please appoint an option.', 'usces'); ?></caption> <?php while (usces_have_options()) : ?> <tr><th><?php usces_the_itemOptName(); ?></th><td><?php usces_the_itemOption(usces_getItemOptName(),''); ?></td></tr> <?php endwhile; ?> </table> <?php endif; ?> <?php if( !usces_have_zaiko() ) : ?> <div class="zaiko_status"><?php echo apply_filters('usces_filters_single_sku_zaiko_message', esc_html(usces_get_itemZaiko( 'name' ))); ?></div> <?php else : ?> <div style="margin-top:10px"><?php _e('Quantity', 'usces'); ?><?php usces_the_itemQuant(); ?><?php usces_the_itemSkuUnit(); ?><?php usces_the_itemSkuButton(__('Add to Shopping Cart', 'usces'), 0); ?></div> <div class="error_message"><?php usces_singleitem_error_message($post->ID, usces_the_itemSku('return')); ?></div> <?php endif; ?> </div><!-- end of skuform --> <?php echo apply_filters('single_item_single_sku_after_field', NULL); ?> <?php do_action('usces_action_single_item_inform'); ?> </form> <?php do_action('usces_action_single_item_outform'); ?> <?php elseif(usces_sku_num() > 1) : usces_have_skus(); ?> <!--some SKU--> <!--<h2 class="item_name SOMESKU"><?php usces_the_itemName(); ?> (<?php usces_the_itemCode(); ?>)</h2>--> <div class="exp clearfix"> <?php the_content(); ?> <?php if( $item_custom = usces_get_item_custom( $post->ID, 'list', 'return' ) ) : ?> <div class="field"> <?php echo $item_custom; ?> </div> <?php endif; ?> </div><!-- end of exp --> <form action="<?php echo USCES_CART_URL; ?>" method="post"> <div class="skuWrap"> <?php do { ?> <div class="skuBox flex"> <div class="skuName"><?php usces_the_itemSkuDisp(); ?></div> <?php if (usces_is_options()) : ?> <div><?php _e('Please appoint an option.', 'usces'); ?></div> <?php while (usces_have_options()) : ?> <div><?php usces_the_itemOptName(); ?></div> <div><?php usces_the_itemOption(usces_getItemOptName(),''); ?></div> <?php endwhile; ?> <?php endif; ?> <div class="priceWrap"> <?php if( usces_the_itemCprice('return') > 0 ) : ?> <s class="cprice"><?php usces_the_itemCpriceCr(); ?></s> <?php endif; ?> <div class="price"><?php usces_the_itemPriceCr(); ?></div> </div> <?php usces_the_itemGpExp(); ?> <div class="zaiko"><?php usces_the_itemZaikoStatus(); ?></div> <div class="quant"><?php usces_the_itemQuant(); ?></div> <div class="unit"><?php usces_the_itemSkuUnit(); ?></div> <?php if( !usces_have_zaiko() ) : ?> <div class="button"><?php echo apply_filters('usces_filters_multi_sku_zaiko_message', esc_html(usces_get_itemZaiko( 'name' ))); ?></div> <?php else : ?> <div class="button"><?php usces_the_itemSkuButton(__('Add to Shopping Cart', 'usces'), 0); ?></div> <?php endif; ?> <div colspan="5" class="error_message"><?php usces_singleitem_error_message($post->ID, usces_the_itemSku('return')); ?></div> </div><!--//skuwrap--> <?php } while (usces_have_skus()); ?> </div> <?php echo apply_filters('single_item_multi_sku_after_field', NULL); ?> <?php do_action('usces_action_single_item_inform'); ?> </form> <?php do_action('usces_action_single_item_outform'); ?> <?php endif; ?> </div><!-- end of itemspage --> </div><!-- end of storycontent --> </div> <?php else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?> </div><!-- end of catbox --> </div><!-- end of content --> <?php get_footer(); ?>
回答1件
あなたの回答
tips
プレビュー