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 doing register_sidebars(2);. Note the extra "s".

実はこれはテーマの方の問題で、テーマに含まれれるfunctions.phpの中で関数名に"s"を付け忘れているというのが真相だそうです。

/wp-content /themes/cutline-3-column-right-11/functions.phpの5行目にあるregister_sidebarに"s"を追加すればOKになりました。

CODE:
  1. /* blast you red baron! */
  2. require_once (ABSPATH . WPINC . '/class-snoopy.php');
  3.  
  4. if ( function_exists('register_sidebars') )
  5. register_sidebars(2);
  6.  
  7. $current = 'r167';
  8. function k2info($show='') {

コメント投稿フォーム(Comment Form)

ご意見ご感想などありましたらコメントとして投稿をお願いします。メールアドレスは非公開になります。

About this blog

日々の四方山話を徒然と・・・
いらっしゃいませ。このブログはオーストラリアの生活に関する話題と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.

Categories

Archives

広告

なかのひと

Feedjit Live Blog Stats

Browser

Chrome Counter Firefox3 Meter

あわせて読みたいブログ

あわせて読みたいブログパーツ
マクロミルへ登録
おこづかいがドンドンたまる”おトク貯金箱”ポイントボックス