phpのバージョンを5から7にあげたことで以下のようなwarningが出てきました。
調べてみても,phpに未定義やシングルコーテーションの付け忘れとかしていないので,なぜなのかわからず時間が過ぎています.
use of undefined constant php - assumed 'php'(this will throw an error in a future version of php) archive.php on line 1
このエラーを消すにはどうしたらいいのでしょうか、ご助力よろしくお願いします.
sorcecodeについて
php
1<?php/* 2Template Name: Archive 3*/ 4?> 5<?php get_header();?> 6 <main id="category_main" <?php post_class();?>> 7 8 <?php 9 $categories = get_the_category(); 10 $tags = get_the_tags(); 11 ?> 12 <header> 13 <div id="header_layer"> 14 <?php echo category_description();?> 15 <nav id="header_nav"> 16 </nav> 17 </div><!--END-header_layer--> 18 </header> 19 <section class="articles_index sec columnColor"> 20 <h1><?php the_archive_title('『','』に関するコラム');?></h1> 21 <div class="columnBox"> 22 <?php 23 24 if(have_posts()):/*if(have_posts()):*/ while (have_posts()):the_post();?> 25 <div class="columnArticle"> 26 <a class="thumbnail" href="<?php the_permalink(); ?>"> 27 <?php the_post_thumbnail(); ?> 28 </a> 29 <div class="textBox"> 30 <h2><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2> 31 <p class="date"><?php the_time('Y年n月j日'); ?></p> 32 </div> 33 <div class="excerpt"><?php the_excerpt();?></div> 34 </div> 35 <?php endwhile;?> 36 <?php 37 endif; 38 wp_reset_postdata(); 39 ?> 40 <div class="pager"> 41 <ul class="page-numbers"> 42 <?php if (function_exists("pagination")) { 43 pagination($additional_loop->max_num_pages); 44 } ?> 45 </ul> 46 </div> 47 </div> 48 </div> 49 </section> 50 51</main> 52<?php get_footer();?>
回答1件
あなたの回答
tips
プレビュー