Support

Account

Home Forums General Issues Custom post type category selector in a new page Reply To: Custom post type category selector in a new page

  • Thanks, John.

    The first part of what you said helped out a lot. I was able to set up a Field Group so that a dropdown appeared on a new Page and one of the Testimonial categories would be able to be selected.

    I’m a bit confused on the second part, however. I had created a new page template (and used it in my test page) so I could tinker with the correct syntax, but I can’t get it to appear. I’d think the syntax would be something like “if a testimonial category is chosen (ie not blank), display it” but it’s not really working out. I also tried using the Basic Display (single value) example syntax from https://www.advancedcustomfields.com/resources/taxonomy/ (even changing the ‘taxonomy field name’ to what I used in my field group), but nothing displays inside the H2 or p, so I know I’m doing something wrong.

    Let’s say my Testimonials custom post type has the following categories: Yardwork, Driveways, Windows, Doors, and Roofs. If I was trying to write the code block in a page template, what would the syntax for such a thing be?

    Or, if I’m making a template (using a slug as you say), can you give me an example of the code block syntax that would go in the template file as you referred to it?