Support

Account

Home Forums Front-end Issues Displaying a category ID Reply To: Displaying a category ID

  • Hi Elliot,

    1. You are setting the variable $post_objects twice. Why?
    Most probably because I don’t know what I’m doing :). I’ve removed the extraneous one on my code now.

    2. I can’t see in your code where you are loading the category for.
    I think this is my problem, I’m not sure how to load the category. What I’ve done is:

    1. Created a custom field type (Promo Boxes) – which includes the categories built-in taxonomy
    2. Created custom fields and tied them to the Promo Boxes CPT
    3. Created a post in Promo Boxes and assigned it to a category
    4. Tried to grab the category ID from this particular post

    Does that make sense?

    There is no custom field containing the category name, should there be?