前提・実現したいこと
WordPressでブログをいくつか作っています。
新しくブログを作り、既存のブログを改めて見ていたら、そのうちの一つがFatal errorで読み込めなくなってしまいました。
どこを修正すれば良いのか教えていただけると幸いです。
使用しているテンプレートはneutralです。
フリーの時から使っているので、他のブログも同じものを使用しています。
2014年にDNS変更に伴い、作者の方が更新通知の表記を消すようにという連絡がありました。
削除したのはfunctions.phpにあるコードです。
// 更新通知 if (strtoupper(get_locale()) == 'JA') { require_once ( get_stylesheet_directory() . '/admin/update_notifier_jp.php' ); } else { require_once ( get_stylesheet_directory() . '/admin/update_notifier.php' ); };
発生している問題・エラーメッセージ
Fatal error: Call to undefined function get_neutral_option() in /home/users/1/lolipop.jp-******/web/****/wp-content/themes/neutral/header.php on line 36
テーマのフォルダ内のheader.phpの36行目が読み込めないのだと思うのですが、
そこを参照すると以下のコードが書いてあります。
該当のソースコード
<?php $options = get_neutral_option(); ?>
試したこと
- 同じテンプレートを使っているブログのソースを確認したが、同じ記述でした。
- 念のためそれをコピーして反映させましたが、ダメでした。
- 先のテーマ配布者からのソースを消す際、header.phpの36行目の表記がおかしいとWPからメッセージが出てウェブ上での更新ができなかったため、FTP経由でソースを書き換えました。
一旦解決したように思えたので、その際のエラーメッセージが不明です。
header.phpのソース
html
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2<html xmlns="http://www.w3.org/1999/xhtml"> 3<head profile="http://gmpg.org/xfn/11"> 4<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> 5 6<title><?php 7global $page, $paged; wp_title( '|', true, 'right' ); bloginfo( 'name' ); 8$site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) echo " | $site_description"; 9if ( $paged >= 2 || $page >= 2 ) echo ' | ' . sprintf( __( 'Page %s', 'neutral' ), max( $paged, $page ) ); 10?></title> 11<meta name="description" content="<?php echo bloginfo('description'); ?>" /> 12 13<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" /> 14<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" /> 15<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> 16 17<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" /> 18<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/comment-style.css" type="text/css" /> 19<?php if (strtoupper(get_locale()) == 'JA'): ?> 20<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/japanese.css" type="text/css" /> 21<?php endif; ?> 22 23<?php wp_enqueue_script( 'jquery' ); ?> 24<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?> 25<?php wp_head(); ?> 26 27<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/scroll.js"></script> 28<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jscript.js"></script> 29<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/comment.js"></script> 30 31<!--[if IE 7]> 32<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/ie7.js"></script> 33<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/ie7.css" type="text/css" /> 34<![endif]--> 35 36<?php $options = get_neutral_option(); ?> 37 38</head> 39<body class="default<?php if(is_page_template('page-noside.php')||is_page_template('page-noside-nocomment.php')||$options['layout'] == 'noside') { echo ' no_side'; }; if (!$options['show_category'] and !$options['show_tag'] and !$options['show_comment']) { echo ' no_postmeta'; }; if (!$options['show_date'] and !$options['show_author']) { echo ' no_postinfo'; }; ?>"> 40 41<div id="wrapper"> 42 43 <div id="<?php if (has_nav_menu('header-menu')) { echo "header"; } else { echo "header2"; }; ?>"> 44 45 <!-- logo --> 46 <div id="logo"> 47 <?php the_dp_logo(); ?> 48 </div> 49 50 <div id="header_meta"> 51 <?php if ($options['show_search']) { ?> 52 <div id="header_search_area"<?php if (!$options['show_rss']&&!$options['twitter_url']) : echo ' style="margin-right:0;"'; endif; ?>> 53 <?php if ($options['custom_search_id']) : ?> 54 <form action="http://www.google.com/cse" method="get" id="searchform"> 55 <div> 56 <input id="search_input" type="text" value="<?php _e('SEARCH','neutral'); ?>" name="q" onfocus="if (this.value == '<?php _e('SEARCH','neutral'); ?>') this.value = '';" onblur="if (this.value == '') this.value = '<?php _e('SEARCH','neutral'); ?>';" /> 57 </div> 58 <div> 59 <input type="image" src="<?php bloginfo('template_url'); ?>/img/search_button.gif" name="sa" alt="<?php _e('Search from this blog.','neutral'); ?>" title="<?php _e('Search from this blog.','neutral'); ?>" id="search_button" /> 60 <input type="hidden" name="cx" value="<?php echo $options['custom_search_id']; ?>" /> 61 <input type="hidden" name="ie" value="UTF-8" /> 62 </div> 63 </form> 64 <?php else: ?> 65 <form method="get" id="searchform" action="<?php echo esc_url(home_url('/')); ?>"> 66 <div><input id="search_input" type="text" value="<?php _e('SEARCH','neutral'); ?>" name="s" onfocus="if (this.value == '<?php _e('SEARCH','neutral'); ?>') this.value = '';" onblur="if (this.value == '') this.value = '<?php _e('SEARCH','neutral'); ?>';" /></div> 67 <div><input type="image" src="<?php bloginfo('template_url'); ?>/img/search_button.gif" alt="<?php _e('Search from this blog.','neutral'); ?>" title="<?php _e('Search from this blog.','neutral'); ?>" id="search_button" /></div> 68 </form> 69 <?php endif; ?> 70 </div> 71 <?php }; ?> 72 <?php if ($options['show_rss']) : ?> 73 <a href="<?php bloginfo('rss2_url'); ?>" class="target_blank" id="header_rss" title="<?php _e('RSS','neutral'); ?>" ><?php _e('RSS','neutral'); ?></a> 74 <?php endif; ?> 75 <?php if ($options['twitter_url']) : ?> 76 <a href="<?php echo $options['twitter_url']; ?>" class="target_blank" id="header_twitter" title="<?php _e('Twitter','neutral'); ?>" ><?php _e('Twitter','neutral'); ?></a> 77 <?php endif; ?> 78 <?php if ($options['facebook_url']) : ?> 79 <a href="<?php echo $options['facebook_url']; ?>" class="target_blank" id="header_facebook" title="<?php _e('Facebook','neutral'); ?>" ><?php _e('Facebook','neutral'); ?></a> 80 <?php endif; ?> 81 </div><!-- END #header_meta --> 82 83 <?php if (has_nav_menu('header-menu')) { ?> 84 <div class="header_menu"> 85 <?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'theme_location' => 'header-menu' , 'container' => '' ) ); ?> 86 </div> 87 <?php } else { ?> 88 <div class="no_header_menu"></div> 89 <?php }; ?> 90 91 </div><!-- END #header -->

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/08/31 00:01
2019/08/31 01:15 編集