Results 1 to 2 of 2

Thread: Categories and post form

  1. #1
    Thread Starter
    buddy62's Avatar
    Join Date
    Oct 2009
    Location
    Malaga, Spain
    Posts
    71
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Categories and post form

    on the question of categories.... my site has 5 sub-domains, call them "super-categories" FREE ads/autos/homes/jobs/services/adult, is there a way of making the post form show just them, and when the ad is posted, to place the ad into the relevant table on the Db??? as the drop downs are too long and look messy, and I want it all to look clean, simple and streamlined, I have to approve the ad anyway so I can choose an appropriate "sub" category at that stage. hope you can understand what I am trying to say??? does anyone have any ideas about this???

  2. #2
    Newbie
    Not a Verified Customer
    daniel's Avatar
    Join Date
    Dec 2009
    Location
    Romania
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Categories and post form

    Not sure if you found a solution for this yet, but I'll give it a try...

    Again, in post-form.php

    Depending on how many categories you have, you could just use exclude option for the ones you don't want to show:

    <?php wp_dropdown_categories('show_option_none=Select One&orderby=name&order=ASC&exclude=category 1,category 2,category 3, &hide_empty=0&hierarchical=1'); ?>

    Category 1 in this case would just be the number 1 and so on.

    Although, if you have a large amount of categories, then you probably just want to use the include option, so that you don't have to exclude 1,000 categories.

    <?php wp_dropdown_categories('show_count=0&hide_empty=0& orderby=name&order=asc include=category 1, category 2, category 3,&number=0&hierarchical=1'); ?>

    I think you'd want to go with the latter. I'm pretty tired, but it looks right to me. Let me know if you have any questions or it doesn't work for you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)