• Hello,
    i created php template in child theme/template-parts/page-hp.php

    Problem is when i copied content from single.php there was not css styles also header/footer. Only content displayed. What exactly part of code i have to copy to make single php page what i can customize?

    • This topic was modified 2 years, 1 month ago by koupmi.
Viewing 1 replies (of 1 total)
  • Hi,

    I’ve been trying to solve the same problem. What worked for me was I’ve copied index.php from main hello folder into my child theme, rename it to single-tour.php (my custom post is called tour), then I’ve removed all if statements starting on line 19 to 35.

    After that I’ve copied the content from single.php file inside template-parts starting from line 12 – the while loop and pasted inside my custom template where the if’s were.

    It’s bit messy but does the job – I can mix custom code with Elementor elements in my template and still have the rest of hello styling, header & footer.

Viewing 1 replies (of 1 total)
  • The topic ‘How to create custom php template’ is closed to new replies.