WordPress.org

Support

Support » Themes and Templates » How to get my custom.php into the entry text like single.php does?

How to get my custom.php into the entry text like single.php does?

  • thupten
    Member

    @thupten

    Can anybody please help me or point me to a tutorial that shows how to include a custom php file as a single page.

    I have a custom.php which contains php code to get some news feed from google and I want to display it in the article content area.

    Do I have to edit single.php? or include my custom.php into single.php?

    thanks alot.

Viewing 2 replies - 1 through 2 (of 2 total)
  • you want it as a page?

    make a copy of page.php and name it whatever you like say… custom.php

    it will already have the loop to display page content. Add in your custom code where you would like

    include the header

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

    at the very top

    Now make your new page from the add new page menu, and assign the Custom page template to it

    thupten
    Member

    @thupten

    Rev. Voodoo. Thanks a lot. it worked.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get my custom.php into the entry text like single.php does?’ is closed to new replies.