Avada Forums Community Forum Custom post type best practices? single.php?

Viewing 1 post (of 1 total)
  • Author
  • Christopher
    Post count: 2

    This is my first time working with Avada.

    I’ve got a couple of custom post types, each with some custom fields, and I’m trying to display some info that (AFAIK) Avada can’t do natively. (I have purchased and am using the Custom Content Pack, which is great, but this goes beyond what that can do.)

    One thing I want to do is display some related posts of one CPT on the single-post pages of the other CPT. The relationship is based on some custom fields. I’ve written a custom WP_Query that correctly grabs the material I want, I now need to figure out the best Avada-way to add that content to my output.

    I watched Geoff’s excellent recipe video on CPTs and custom fields, but it didn’t quite get me all the way there.

    I created a conditional layout and targeted my post type, but I don’t see an Avada Builder way to incorporate my custom loop.

    I tried adding a single-workshop.php file to my child theme, but it doesn’t appear to get used to render the content. Show Current Template says that my single CPTs are being rendered with template-page.php? There’s clearly something I don’t understand about the Avada template hierarchy.

    I can sort of manage it with a hook, but my filter mojo isn’t quite as good as my ability to write custom templates, so I’d prefer to go that route if possible.


Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.