WORDPRESS
[WordPress] Category由Checkbox轉成Radio Button

Checkbox to Radio Button

因為Theme的問題,如果Post選了兩個Category的話,顯示會好醜,所以最好還是限制只可選一個Category,最簡單的做法就是用Radio Button取代Checkbox避免Multiple Selections啦~

做法

只需在functions.php加以下的Code就可

參考

カテゴリー選択をラジオボタンに
https://ja.forums.wordpress.org/topic/3631

One thought on “[WordPress] Category由Checkbox轉成Radio Button

  • Leave a Reply

    Your email address will not be published.

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">