Site logo

Archived topic

Template Custom Post Type

3 replies · Started by Jens on March 22, 2021

Viewing posts 1–4 of 4

How is the date, author, category and keyword displayed for a CostumPostType? The CostumPostType template should be a copy of the standard template in the first step, which should be changed later (e.g. with user-defined fields)

Example: Post: https://bvv.lichtenberg.info/2021/03/22/exampel-post/
and the same as CostumPostType-Post: https://bvv.lichtenberg.info/bvv/example-bvv-post/

Do I have to enter something else in functions.php?

I did the following steps (as described here)
https://docs.generatepress.com/article/setting-up-a-simple-custom-post-type/

Register the new Costum post type „bvv” and a new taxonomie “bvv-categorie”
Copy and rename New templates (bvv.php, content-bvv.php) in child-theme folder
Edit bvv.php in line 29 (generate_do_template_part( 'bvv' );)

Many thanks for your help.

Thank you very much. My "problem" is solved. I'm trying to get a little better in English and learn about PHP.

Nice one. Glad you got it sorted. No problem. :)

This archived topic is closed to new replies.