Site logo

Archived topic

template for one page

5 replies · Started by Thierry on August 23, 2021

Viewing posts 1–6 of 6

Hello,

I want create a template for only one page.

In my child theme i create "page-4715.php' (4715 is the ID of my page)

I create "content-4715.php" but i write this code "generate_do_template_part('content','4715');" and i try other code but d'on't work. Can you help me please ?

thx

Hi,

Thanks but it's page, no CPT. I try with Id page or slug but don't work.

It doesn't matter if its a CPT or any post type.
What i meant was to use this function:

get_template_part instead of generate_do_template_part

Great, thank you

You're welcome !

This archived topic is closed to new replies.