[codex] 下拉選單 – 文章

*without submit*

<form name="archiveform" action="">
<select name="archive_chrono" onchange="window.location = (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">
<option value=''>按月彙整</option>
<?php wp_get_archives('format=option&show_post_count=1'); ?>
</select>
</form>

*without submit*

<li id="archives">按月彙整<!-- <?php _e('Archives'); ?> -->
<ul>
<form action="" name="Month" id="Month">
<select name="menu_month" id="menu_month" onchange="jumpMenu('parent',this,0)">
<option value="">請選擇</option>
<?php wp_get_archives('format=option&show_post_count=1'); ?>
</select>
</form>
</ul>
</li>

[codex] 下拉選單 – 分類

*下拉分類 with submit*

template-functions-category.php

  • 分類彙整

  • *下拉分類 without submit* ( "參考":http://codex.wordpress.org/Template_Tags/dropdown_cats )


    [Plugins] 文章置頂

    Adhesive
    http://www.asymptomatic.net/_wiki/Adhesive

    中文參考:Sticky Post

    把檔案拷貝到 Plugins 目錄之下,然後啟動它。
    發表新文章之後,再進入編輯狀態,就可以在「文章狀態」看到 Sticky 選項。

    勾選它,就可以讓文章置頂囉!

    [Theme] 標頭允許連結

    header.php

    style="CURSOR: pointer" onclick="location.href='/';"

    在 HEADER 標記處,加上後面一段語法,就可以讓整個標頭可以連結。

    之前很笨,一直為了網誌名稱及網誌描述搞不定而傷神。
    參考了 hsuyo's blog 的網頁,發現了這個語法技巧,
    感謝 hsuyo (雖然他不認識我),感謝網際網路!

    [Theme] 修正 rss feed 的東東

    footer.php

    一些網友說他不會訂閱我的 blog,
    我看了一下,才發現 WP 1.5 多了一個 feed: 字樣 (怪怪)。
    拿掉之後,就是之前的慣用方式。

    原為:feed:http://xxxx
    改為:http://xxx

    wp-blog-header.php

    有人說 RSS Feed 經常會無法正常抓取,所以要做一些修正。

    原為:

    (false === strpos($_SERVER['PATH_INFO'], 'index.php'))

    改為:

    (false === strpos($_SERVER['PATH_INFO'], '.php'))