2008-05-25 (日曜日) In: WordPress (1,352 views)
WordPressでCutline 3-Column Right 1.1というテーマを使ってみようとダウンロードしてきて試したところ、下記のようなエラーが出ました。
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in ...../wp-includes/widgets.php on line 60
エラー内容からちょっと検索してみると、
http://wordpress.org/support/topic/165568
The solution is located here:
http://wordpress.org/support/topic/148108
I put the one line of code in the widgets.php file on the line number that was the problem (for me it was line 60 - the old code was
$sidebar = array_merge($defaults, $args);The proper code should be:
$sidebar = array_merge($defaults, (array)$args);
というWordPressに変更を入れる解決方法が出てきているのですが、
No, that's not your problem. The real problem is in your theme, it's making a call to the register_sidebar function with incorrect parameters. I suspect that it's something like
register_sidebar(2);in your theme's functions.php file, when it should really be doingregister_sidebars(2);. Note the extra "s".
実はこれはテーマの方の問題で、テーマに含まれれるfunctions.phpの中で関数名に"s"を付け忘れているというのが真相だそうです。
/wp-content /themes/cutline-3-column-right-11/functions.phpの5行目にあるregister_sidebarに"s"を追加すればOKになりました。
ご意見ご感想などありましたらコメントとして投稿をお願いします。メールアドレスは非公開になります。
日々の四方山話を徒然と・・・
いらっしゃいませ。このブログはオーストラリアの生活に関する話題とFreeBSDに関連する話題を主に色々と書き綴っています。
Sorry, This site consists of Japanese contents only. If you are interested in my blog, feel free to leave your comments in English or Japanese. Thank you.