Displaying customized content via PHP?
-
I have created a custom post type – ‘resources’
That post type has a set of custom categories, such as ‘audience’
Doing no other customizing, I go to https://mysite.com/resources-category/audience/ and get pretty much what I expect – a list of the ‘resources’ which I have categorized as ‘audience’.
But – this list does not use any of the custom templates defined in ‘my content management’ – how can I get this to use the custom templates?
In PHP I tried do_shortcode(“[..]”) with no success, even though I had copied in a shortcode that works fine when I post it in a page (I want to use PHP to easily modify this code as people select different categories from a list).
And to confuse me more, when I click on the post title in that list – I get the single entry at the link https://mysite.com/resource/entry-slug/ – this time, it DOES use the custom template for full listings, which is great – except that the {terms} code used in the custom template doesn’t display anything (it does when I use the shortcode for the full listing on a Page).
So – either I need to figure out how to format this via PHP, or figure out how to tell WP to use one of the custom templates, or – the simplest – figure out how to get the do_shortcode() function to work.
- The topic ‘Displaying customized content via PHP?’ is closed to new replies.