※この記事は過去の情報です。Artisteerのウィジェットの問題は正式版のリリースで修正されました。

WordPressテーマを簡単に作るソフト「Artisteer」を使うと、3カラムのテーマのサイドバーが1つしかウィジェットに対応していない。
そこでウィジェットに対応するように少し修正する必要があるので、修正箇所を書いておきます。

sidebar.php
1行目を
<?php if (!function_exists(’dynamic_sidebar’) || !dynamic_sidebar(1) ) : ?>
に変更。
一番最後の行
<?php endif; ?>
に変更。(;を追加)

これがサイドバー1の設定。

alternative_sidebar.php
同じく1行目を
<?php if (!function_exists(’dynamic_sidebar’) || !dynamic_sidebar(2) ) : ?>
に変更。
最終行を
<?php endif; ?>
に変更。(;を追加)

これがサイドバー2の設定になります。

functions.php
3行目    register_sidebars(1, array( を
register_sidebars(2, array(
に変更。
サイドバーが2個って意味。

スタイルシートでカレンダー部の設定がないので、自分で追加。

adsense-deluxeプラグインなどでadsenseを入れる場合もタグを自分で追加。
<?php adsense_deluxe_ads(’adsense’); ?>
(adsenseの部分はadsense_name)をpage,single,archive,archives,indexに入れる。

コピーライトはfooter.phpを編集したければ編集。

アーカイブのページが大幅におかしいので、例えばこんな感じに↓に変更。(全文)
<?php get_header(); ?>
<div class=”contentLayout”><table class=”contentTable”><tr><td class=”w20″><?php include (TEMPLATEPATH . ‘/sidebar.php’); ?></td><td class=”w”>
<div class=”Block”>
<div class=”Block-content”>
<div class=”BlockContent”>
<div class=”BlockContent-content”>

<?php if (have_posts()) : ?>

<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class=”pagetitle”>Archive for the &#8216;<?php echo single_cat_title(); ?>&#8217; Category</h2>

<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2 class=”pagetitle”>Archive for <?php the_time(’Y年m月j日’); ?></h2>

<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2 class=”pagetitle”>Archive for <?php the_time(’Y年m月’); ?></h2>

<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2 class=”pagetitle”>Archive for <?php the_time(’Y年’); ?></h2>

<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h2 class=”pagetitle”>Author Archive</h2>

<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h2 class=”pagetitle”>Blog Archives</h2>

<?php } ?>

<div class=”navigation”>
<div class=”alignleft”><?php next_posts_link(’&laquo; Older Entries’) ?></div>
<div class=”alignright”><?php previous_posts_link(’Newer Entries &raquo;’) ?></div>
</div>

<?php while (have_posts()) : the_post(); ?>
<div class=”post”>
<h3 id=”post-<?php the_ID(); ?>”><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></a></h3>
<small><?php the_time(’l, F jS, Y’) ?></small>

<div class=”entry”>
<?php the_content() ?>
</div>

<?php adsense_deluxe_ads(’adsense’); ?>

<p class=”postmetadata”><?php the_tags(’Tags: ‘, ‘, ‘, ‘<br />’); ?> Posted in <?php the_category(’, ‘) ?> | <?php edit_post_link(’Edit’, ”, ‘ | ‘); ?>  <?php comments_popup_link(’No Comments &#187;’, ‘1 Comment &#187;’, ‘% Comments &#187;’); ?></p>

</div>

<?php endwhile; ?>

<div class=”navigation”>
<div class=”alignleft”><?php next_posts_link(’&laquo; Older Entries’) ?></div>
<div class=”alignright”><?php previous_posts_link(’Newer Entries &raquo;’) ?></div>
</div>

<?php else : ?>

<h2 class=”center”>Not Found</h2>
<?php include (TEMPLATEPATH . ‘/searchform.php’); ?>

<?php endif; ?>

</div>
</div>

</div>
</div>

</td><td class=”w20″><?php include (TEMPLATEPATH . ‘/alternative_sidebar.php’); ?></td></td></tr></table></div>
<?php get_footer(); ?>

上部のナビゲーションバーの階層を表示しないならheader.phpの下から3行目
<?php wp_list_pages(’title_li=&depth=1′ ); ?>
に変更。

思ったんだが…修正すべき点が多すぎてまるで使えない…orz

タグ: , ,

Related Articles:

関連するかもしれない記事

スポンサードリンク