2011-01-06 31 views

答えて

7

少し具体的になりますか?ここにあなたのテーマのウィジェットが準備をする方法は次のとおりです。

のfunctions.php

// register sidebars 
if (function_exists('register_sidebar')) 
    if (function_exists('register_sidebar')) 
     register_sidebar(array('name'=>'Left Sidebar', //Name your sidebar 
     'description' => 'These widgets will appear in the left sidebar.', 
     'before_widget' => '<div class="widget">', // Displays before widget 
     'after_widget' => '</div>', // Displayed after widget 
     'before_title' => '<h3>', //Displays before title, after widget start 
     'after_title' => '</h3>' //Displays after title 
    )); 

あなたのサイドバーが表示されますどこ次にこれを置く:

<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar Name Here')) : ?> 
    <!-- static content goes here if sidebar is inactive --> 
<?php endif; ?> 
+0

+1、偉大な答えを、ハロー@Jared、 dynamic_sidebar()のタイトルは、どのように私たちのページに表示されますか? – SagarPPanchal

関連する問題