0

私はSimpleCorpテーマを使用していますが、この4 つの画像とテキストのブロックを 6 つに増やす必要があります。index.php をカスタム .php ページ テンプレートにリダイレクトしようとしましたが、まったく機能しませんでした...

次に試したのは、 /wp-content/themes/simplecorp/admin/options/homepage.php で、以下のコードを見つけたことです(4ブロックですが、数字が増えています)

$options[] = array( "name" => "Content Box 1 Title",
                    "id" => $shortname."_homecontent1title",
                    "std" => "Awesome Features",
                    "type" => "text");

$options[] = array( "name" => "Content Box 1 Text",
                    "id" => $shortname."_homecontent1",
                    "std" => "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.",
                    "type" => "textarea");

$options[] = array( "name" => "Content Box 1 Image",
                    "desc" => "Click to 'Upload Image' button and upload Content Box 1 image.",
                    "id" => $shortname."_homecontent1img",
                    "std" => "$blogpath/library/images/sampleimages/featured-img-01.png",
                    "type" => "upload");

$options[] = array( "name" => "Content Box 1 URL",
                    "id" => $shortname."_homecontent1url",
                    "std" => "#",
                    "class" => "sectionlast",
                    "type" => "text");

そして、数字をコピーして貼り付け、目的の数である 6 までインクリメントすることで、さらに 2 つ (5 番目と 6 番目) を作成しました。しかし、wp-admin パネルをリロードしようとすると、さらに 2 つの設定グループが表示されることを期待して、代わりに空白のページが表示されました。ホームページ ブロックの数は何かに関連していると思いますが、それにはちょうど 4 つのブロックが必要です。しかし、何?...

誰かが私に解決策を提案してくれたら、とても感謝しています!

4

3 に答える 3

0

admin/options/homepage.php にさらに 2 つのボックス (5 と 6) を追加すると、それらが admin のオプション パネルに表示されるようになります。空白のページが表示された場合は、「,」または「;」で小さなエラーが発生した可能性があります。どこか?それとも、必要に応じてすべての数字を変更していないのでしょうか?

もう一度試してみて、管理画面に 5&6 が表示されるようにしてください。テーマのルート フォルダーにある home.php ファイルにそれらを追加するだけではありません。

于 2013-11-09T21:43:00.943 に答える