Forums

Placing php elements within a Page. (4 posts)

  1. planesfillingwc
    Member
    Posted 1 year ago #

    I have no idea how common this is, but I'm wanting to create pages that utilize php elements. I installed a plugin that makes php recognizable in pages. It seems to work well enough for some things. However, I'm just wondering, is there a more efficient way of doing this? My initial idea was to create an all new php file borrowing many elements from the page.php but still having its own unique layout. I've not had success making that work, though.

  2. esmarts
    Member
    Posted 1 year ago #

    I would not think it would be very hard since the whole thing is php anyways.

  3. Darran
    Member
    Posted 1 year ago #

    You can create a template for that specific page. For e.g. contact

    <?php
    /* Template Name: Contact */
    ?>

    And all you have to do when you create a page is to make use of this template, and there you have it. You can custom code the template to make use of the page.php layout.

  4. planesfillingwc
    Member
    Posted 1 year ago #

    Cool, thanks. I think I got it worked out.

    I figured this would be an easy solution.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags