Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #522363

    Hello,

    I have a child theme and want to include a specific page for a specific ID. Let says page id 29.

    So i add to my child theme root a PHP file : page-29.php . But that doesn’t work, my page isn’t display when i’m in the FRONT.

    I also try with slug page-slug.php without success.

    This solution work for basic theme, did you have a solution ?

    I see this post, but i prefer not using template.

    Thx for your time and work

    Regards

    • This topic was modified 9 years, 1 month ago by leplusweb.
    #523227

    Hi leplusweb!

    why not use a template? I think it would work fine for you.

    Regards,
    Andy

    #523634

    Hi,

    I try to use a template in my child theme. I add page.php to it and in page.php add this code

    get_template_part( "includes/moncompte", "page-29" );
     get_template_part( 'includes/loop', 'page' );

    In my child theme I add a folder includes/moncompte and in it a page-29.php (-copy of page.php)

    I think i’m doing it wrong and doesn’t masterize what i’m doing.

    I try to create a customize page.php for the page with the ID 29.

    PS : I try to change my theme to Twenty Fifteen and it’s work fine. My file page-29.php at the root is display correctly.

    Thx for your help on this.

    Regards

    • This reply was modified 9 years, 1 month ago by leplusweb.
    #524723

    Hey!

    Why do you need to do this? Can you please provide a screenshot of the layout that you’re trying to achieve? If you created a template called page-ID.php file, make sure that the page is not using the advance layout builder. Switch back to the Default Editor then update the page. For testing purposes, edit the page then switch to the default editor, update. Create a duplicate of the page.php file then rename it to page-ID.php file (make sure that the page id is correct). Remove every code in the page-ID.php file then check the page. You should see a blank page. If it is blank then you know that the template is working.

    Cheers!
    Ismael

    #525423

    Hi,

    thx for your return. It’s work !

    I copy the page.php and rename it page-29.php. Erase the content in the file and the BackEND administration. Switch to default editor and it’s ok.

    Cheers !

    #525957

    Hi,

    Great, glad you got it working. Please let us know if you have any more questions on the topic.

    Cheers!
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.