Using WordPress there are unlimited abilites, all you can do on WordPress. Today WordPress Tutorial is How To Create Dynamically Search Categories and Child Categories Only Form.
There are some problem or litle bit hack to create custom WordPress, example we want to create search form only on spesify categories. Using This code below you can do it easely.
To Use this code is simple, just write down this code whatever you want put this form and done.
<form method=â€get†id=â€searchform†action=â€<?php bloginfo(‘home’); ?>/â€> <div id=â€searchâ€> <input type=â€text†value=â€Search… †onclick=â€this.value=â€;†name=â€s†id=â€s†/> <?php $categories = get_categories(‘child_of=1′); $catlist = â€; foreach ($categories as $cat) { $catlist.= $cat->cat_ID.’,'; } $catlist.’5′; ?> <input type=â€hidden†name=â€cat†value=â€<?php echo “$catlistâ€?>†/> <input name=â€" type=â€image†src=â€<?php bloginfo(‘stylesheet_directory’); ?>/styles/<?php echo “$style_pathâ€; ?>/search.gif†value=â€Go†class=â€btn†/> </div><!–/search –> </form>
You can tweak this code, example you need to search on category 3, Edit on child_of
parameter above.
Thanks for WP Garage to create tutorial How To Create Dynamically Search Categories and Child Categories Only Form
setelah dicopypastekan
webnya gk jalan
blank putih