Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Taxonomy Name WordPress

  • REFUNDED

Hello there!

I have [[LINK href="http://jobtribe.com/resume/ysgcgrt4ml-william-dorsey"]]this page.[[/LINK]]

Where you read "Preferred Industry" and see a #68. I'm trying to output a category name with this:

<?php the_resume_field( 'candidate_industry' ); ?>

but I keep on getting the ID I guess.

Can anyone help?

Answers (6)

2015-04-02

Hiro Hito answers:

try

<?php get_resume_field( 'candidate_industry' ); ?>

2015-04-02

Navjot Singh answers:

Can only see the coming soon page.


Navjot Singh comments:

Try <?php echo get_resume_field( 'candidate_industry' ); ?>


intilabs comments:

Sorry guys. I lifted that coming soon page now.

2015-04-02

Arnav Joy answers:

I can not see the site as it requires login..

what are you using , any plugin?

2015-04-02

Jayaram Y answers:

try this.

<?php
$category = get_the_category();
echo $category->cat_name;
?>

2015-04-02

Andrea P answers:

are you getting
68

or actually
#68

the id should be without the hashtag. so I don't know what is that

in any case, that's not a wordpress core function, so I assume it's from your template.
I'll need to look at your template code in order to understand which functions we can use.
in particular, if that is actually printing out the ID prepended with an hashtag, we could retrieve it and get the tax name, but we will need a function like

get_resume_field()

which could actually don't exists, it depends on the functions names of your theme..

if it exists, and it includes the hashtag, we could do something like this:


<?php
$resume_field = get_resume_field('candidate_industry');
$term_ID = str_replace("#","",$resume_field);
$term_obj = get_term($term_ID, 'YOUR_TAXONOMY_NAME');
echo $term_obj->name;
?>


replace YOUR_TAXONOMY_NAME with the slug of your taxonomy.


by the way, I really need more info and at least to see your site (only coming soon page is visible..), otherwise I could guess 10 different code snippet without any of them actually being good for your specific case..


****** UPDATE ******
now that I can see your site, it seems that the function you are using is not adding the # before the number, so my code should be modified in this way:


<?php
$term_ID = get_resume_field('candidate_industry');
$term_obj = get_term($term_ID, 'YOUR_TAXONOMY_NAME');
echo $term_obj->name;
?>


but I'm still not sure that your function gets the id of the taxonomy term.. it's weird because the name the_resume_field, doesn't sound like something which prints out the id of a taxonomy term.. in particular, there is not much use for printing an ID, you normally retrieve the ID to store it in vars and use it in functions, so I don't know why they would have made it..

2015-04-05

Monit Jadhav answers:

Have you tried this.



<?php
$category_id = get_resume_field( 'candidate_industry' );

$category_name = get_cat_name( $category_id );

echo $category_name;

?>


Monit Jadhav comments:

Its all a guessing game cause I really dont know what

the_resume_field( 'candidate_industry' )

is fetching, so its a guess that its a category. Does job tribe have a function reference anywhere? that way I can make a better solution for you?

Regards

Monit