07 Ağustos 2009

Searching in A Selected Category

WordPress Yorum Ekle

WordPress searching system is'nt usefull. When you search something, it searches in posts, pages. It begins many unnecassary results. But if we can allow our visitors to select a category for their searching by creating a custom search form has a category dropdown list, i think it will be more usefull.
To do this, add theese codes in where you want to show your search form:

wp_dropdown_categories('show_option_all='.__('All Categories').'&hierarchical=1&echo=0')

echo $search_form;
Of course, you can customize the form using CSS as you want.
See at top of my sidebar. You can it (Notice: 'All Categories' means 'Tüm Kategoriler' and 'Search' means 'Ara' in Turkish).
I am sorry, i have a poor English.

Bu yazının kısa bağlantısı http://www.yakupgovler.com/?p=971.

Yazılarımı RSS aboneliği ile takip edebilir, yeni yazılarıma kolaylıkla ulaşabilirsiniz. Bunun için ise RSS adresimi kullanabilirsiniz.