Results 1 to 2 of 2

Thread: How to create Job Category dropdown and to replace its link to term->slug?

  1. #1
    Thread Starter
    Amateur maorlast's Avatar
    Join Date
    May 2011
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to create Job Category dropdown and to replace its link to term->slug?

    Hello,
    I have the following form which displays job categories in a dropdown list,
    I would like to change the <a href> so once a value was selected that the <a href> will point to the term->slug and not not to the term-id (in wp_terms database)
    how can i do it?

    Code:
    <form>
    <p class="<?php if (get_option('jr_submit_cat_required')!=='yes') : echo 'optional'; endif; ?>"><label for="job_cat"><?php _e('Job Category', 'appthemes'); ?> <?php if (get_option('jr_submit_cat_required')=='yes') : ?><span title="required">*</span><?php endif; ?></label> <?php
    				$sel = 0;
    				if (isset($posted['job_term_cat']) && $posted['job_term_cat']>0) $sel = $posted['job_term_cat']; 
    				global $featured_job_cat_id;
    				$args = array(
    				    'orderby'            => 'name', 
    				    'exclude'			 => $featured_job_cat_id,
    				    'order'              => 'ASC',
    				    'name'               => 'job_cat',
    					'hierarchical'       => 1, 
    				    'echo'				 => 0,
    				    'class'              => 'job_cat',
    				    'selected'			 => $sel,
    				    'taxonomy'			 => 'job_cat',
    				    'hide_empty'		 => false
    				);
    				$dropdown = wp_dropdown_categories( $args );
    				echo $dropdown;
    			?></p>	
    			
    			
    			<input type="submit" name="submit" value="view" />
    			</form>

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,978
    Thanks
    170
    Thanked 3,407 Times in 3,278 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. slug and name in dropdown categories step1
    By copyme in forum ClassiPress General Discussion
    Replies: 0
    Last Post: May 7th, 2012, 06:18 AM
  2. [TUTORIAL] Adding the category dropdown (homepage link)to a custom nav bar
    By bleem in forum ClassiPress General Discussion
    Replies: 5
    Last Post: March 30th, 2012, 11:38 AM
  3. [SOLVED] How can I display slug of parent category/term on a child category/term page?
    By cubtuc in forum Report ClassiPress Bugs
    Replies: 3
    Last Post: November 10th, 2011, 11:35 AM
  4. [SOLVED] I'm getting a broken link where the slug should be?
    By davids in forum Report Clipper Bugs
    Replies: 7
    Last Post: October 25th, 2011, 09:00 PM
  5. Is it possible to get the category id and slug in ads detail page
    By gondal4u in forum ClassiPress General Discussion
    Replies: 1
    Last Post: September 27th, 2011, 08:57 AM