0
votes

I have installed Wordpress multisite (5.5.1) and created some custom post types. I have also created some custom templates.

Custom post type: "illustration"

Template file: illustration.php

The template file is empty apart from the name and an echo showing the template name

    Theme Name: ae-2020
    Template Name: illustration
    Template Post Type: illustration
    * 
    The template for displaying illustration pages
    * 
    Version: 1.0

    Description:
    */

The template name shows up in the page attributes dropdown. However when I view the post the index template is used. If I go to posts and view the "Hello World" post it uses my single.php template as expected.

What am I doing wrong?

Help appreciated.

David

2

2 Answers

0
votes

Maybe this can be helpful, this shows what prefixes and names to uses in wordpress hierarchy of templates Wordpress template hierarchy

And here a link with wordpress documention of theme development https://codex.wordpress.org/Theme_Development

0
votes

This template is use for illustration post type. That mean it's just apply for illustration post type. While the "Hello world" is wp builtin post type and it's use single.php as template in default!

if you want to display the post using your template, change template's header into this:

Template Post Type: illustration, post