このサイトについて

PHPでWEB作成 により制作、運営しています。

sidebar.phpの詳細

    <div id="sidebar">
        <ul>
<!-- dynamic_sidebar はウィジェットを表示する *0 -->
            <?php     /* Widgetized sidebar, if you have the plugin installed. */
                    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
            <li>
<!-- 検索フォームを挿入 -->
                <?php include (TEMPLATEPATH . '/searchform.php'); ?>
            </li>

<!-- 著者情報: 現在は使わない方向へ -->
            <!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
            <li><h2><?php _e('Author', 'kubrick'); ?></h2>
            <p>A little something about you, the author. Nothing lengthy, just an overview.</p>
            </li>
            -->

<!--
    if 文開始 *1
    is_404: ページが存在しない場合
    is_category: カテゴリーアーカイブ
    is_day: 日別アーカイブ
    is_month: 月別アーカイブ
    is_year: 年別アーカイブ
    is_search: 検索結果ページ
    is_paged: アーカイブが複数ページになる場合
-->
            <?php if ( is_404() || is_category() || is_day() || is_month() ||
                        is_year() || is_search() || is_paged() ) {
            ?> <li>

<!-- if 文開始 *2 -->
            <?php /* If this is a 404 page */ if (is_404()) { ?>
<!-- 閲覧中のアーカイブの情報を表示 -->
            <?php /* If this is a category archive */ } elseif (is_category()) { ?>
            <p><?php printf(__('You are currently browsing the archives for the %s category.', 'kubrick'), single_cat_title('', false)); ?></p>

            <?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
            <p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for the day %3$s.', 'kubrick'), get_bloginfo('url'), get_bloginfo('name'), get_the_time(__('l, F jS, Y', 'kubrick'))); ?></p>

            <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
            <p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for %3$s.', 'kubrick'), get_bloginfo('url'), get_bloginfo('name'), get_the_time(__('F, Y', 'kubrick'))); ?></p>

            <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
            <p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives for the year %3$s.', 'kubrick'), get_bloginfo('url'), get_bloginfo('name'), get_the_time('Y')); ?></p>

            <?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
            <p><?php printf(__('You have searched the <a href="%1$s/">%2$s</a> blog archives for <strong>&#8216;%3$s&#8217;</strong>. If you are unable to find anything in these search results, you can try one of these links.', 'kubrick'), get_bloginfo('url'), get_bloginfo('name'), wp_specialchars(get_search_query(), true)); ?></p>

            <?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
            <p><?php printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives.', 'kubrick'), get_bloginfo('url'), get_bloginfo('name')); ?></p>

<!-- if 文終了 *2 -->
            <?php } ?>

<!-- if 文終了 *1 -->
            </li> <?php }?>

<!-- ページリスト表示: オプション多数 -->
            <?php wp_list_pages('title_li=<h2>' . __('Pages', 'kubrick') . '</h2>' ); ?>

<!-- archive を日本語に訳して表示 -->
            <li><h2><?php _e('Archives', 'kubrick'); ?></h2>
                <ul>
<!-- 日付ベースのアーカイブ表示: オプション多数 -->
                <?php wp_get_archives('type=monthly'); ?>
                </ul>
            </li>

<!-- カテゴリリスト表示: オプション多数 -->
            <?php wp_list_categories('show_count=1&title_li=<h2>' . __('Categories', 'kubrick') . '</h2>'); ?>

<!-- ホーム/ページかどうか判定 *3 -->
            <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
<!-- ブックマークを表示 -->
                <?php wp_list_bookmarks(); ?>

<!-- meta を日本語に訳して表示 -->
                <li><h2><?php _e('Meta', 'kubrick'); ?></h2>
                <ul>
<!-- 登録ページへのリンクを表示 -->
                    <?php wp_register(); ?>
<!-- ログインページへのリンクを表示 -->
                    <li><?php wp_loginout(); ?></li>
<!-- w3c, xfn, wordpress.org へのリンクを表示 -->
                    <li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional', 'kubrick'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>', 'kubrick'); ?></a></li>
                    <li><a href="http://gmpg.org/xfn/"><abbr title="<?php _e('XHTML Friends Network', 'kubrick'); ?>"><?php _e('XFN', 'kubrick'); ?></abbr></a></li>
                    <li><a href="http://wordpress.org/" title="<?php _e('Powered by WordPress, state-of-the-art semantic personal publishing platform.', 'kubrick'); ?>">WordPress</a></li>
<!-- メタ情報を表示 -->
                    <?php wp_meta(); ?>
                </ul>
                </li>
<!-- if 文終了 *3 -->
            <?php } ?>

<!-- if 文終了 *0 -->
            <?php endif; ?>
        </ul>
    </div>

※ wordpress 2.7 準拠です。最新版は次回セミナー受講生限定で配布予定です。

Sign in  |  Recent Site Activity  |  Terms  |  Report Abuse  |  Print page  |  Powered by Google Sites