wordpressを移行したらうまく行かず原因を調べる為にwp-config.phpに
define('WP_DEBUG', true);
を入れて調べてみました。
下記のコードの
の部分がエラーになっていました。
エラーはこんな感じでした。
Fatal error: Can't use function return value in write context in /home/sites/heteml/users/k/k/a/ssample/web/sample.biz/sample-low/wp-content/themes/sample/index.php on line 232
こちらを削除すればうまくいきましたが
なぜエラーになったか原因が知りたいです。
よろしくお願いします。
php
1<section class="sales"> 2 <a id="sales"></a> 3 <div class="content"> 4 <div class="title wow fadeIn" data-wow-duration="2s" data-wow-offset="100"> 5 <figure> 6 <img src="<?php echo get_template_directory_uri(); ?>/img/img_bg_h1.png" alt=""> 7 <figcaption>仕事紹介</figcaption> 8 </figure> 9 </div> 10 <div class="content_box1 job_wrap wow bounceInUp" data-wow-duration="2s" data-wow-offset="100"> 11 <div class="job_list"> 12 <?php query_posts('posts_per_page=2'); ?> 13 <?php 14 if ( have_posts() ) : 15 while ( have_posts() ) : the_post (); 16 ?> 17 <div class="job-item"> 18 <a href="<?php the_permalink(); ?>"> 19 <?php if(empty(SCF::get('top-mv'))):?> 20 <figure><img src="<?php echo get_template_directory_uri(); ?>/img/no-image.png" alt=""></figure> 21 <?php else: ?> 22 <figure><?php echo wp_get_attachment_image( SCF::get('list-img') , 'full' ); ?></figure> 23 <?php endif; ?> 24 <dl> 25 <dt>募集職種:</dt> 26 <dd><?php echo SCF::get('list-ttl'); ?></dd> 27 </dl> 28 <div class="list-read"><?php echo preg_replace("/(<[a-zA-Z0-9=\"/\ ]+>)<br\ />/", "$1", nl2br(SCF::get('list-read'))); ?></div> 29 </a> 30 </div> 31 <?php 32 endwhile; 33 endif; 34 ?> 35 </div> 36 37 <div class="btn-area"> 38 <a href="<?php echo home_url(); ?>/joblist/">仕事紹介一覧</a> 39 </div> 40 </div> 41 42 </div> 43 </section>
回答2件
あなたの回答
tips
プレビュー