Site logo

Archived topic

create custom template

3 replies · Started by Hilton on June 18, 2020

Viewing posts 1–4 of 4

Hello, I created a template for single.php with the name single-recipes.php (on a child theme).

In line 21 I changed it to get_template_part ('content', 'single-recipes'), and created the content-single-recipes.php template.

How can I do with the comments.php file so that I can create comments-recipes.php and make references to it in the single-recipes.php?

As it is a recipe template, I need to make some changes.

Hi David,

I tried to edit but I must be doing something wrong because it is not working. My comments-recipes.php file is inside the child theme folder, so I edited it by adding the following, but it didn't work ...

<? Php comments_template ('/comments-recipe.php'); ?>

Hi there,

Does comments-recipe.php exist in your child theme?

The code should look like this:

<?php comments_template('comments-recipe.php'); ?>

This archived topic is closed to new replies.