[Resolved] custom page template – how to?

Home Forums Support [Resolved] custom page template – how to?

Home Forums Support custom page template – how to?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1377771
    AdB

    Hi, I’m trying to create a custom page template in order to use it with advanced custom fields.

    So I duplicated and renamed the page.php file (let’s say information-page-template.php) . I see that the “content” of the page are loaded via the “content-page.php” file.

    So I guess I need also a second content-page.php file, right?

    How do I assign the new content-page.php file to the information-page-template.php file?
    thank you!

    Davide

    #1377832
    David
    Staff
    Customer Support

    Hi there,

    thats correct.
    In your custom template, replace:

    get_template_part( 'content', 'page' );

    with:

    get_template_part( 'content', 'my-slug' );

    This assumes your custom content template is named: content-my-slug.php

    #1378502
    AdB

    perfect, thank you!
    Davide

    #1378855
    David
    Staff
    Customer Support

    You’re welcome

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