Ready to get started?Download WordPress


using get method to call a page (2 posts)

  1. Mcchan87
    Posted 2 years ago #

    Hi I added a page let's call it newpage.php to the folder. I want to call newpage.php and so I think I'm suppose to use

    <?php get_newpage(); ?>

    Right? But it's returning an error " Fatal error: Call to undefined function..."

    Where do I go to define the newpage function?

  2. jomsky
    Posted 2 years ago #

    Hi, I think you misunderstood the include functions of WordPress like get_sidebar(), get_header() and get_footer(). These functions are found within WordPress and were made to make including of template parts easier. If you want to include a PHP file you can just use the PHP function include() or require().

Topic Closed

This topic has been closed to new replies.

About this Topic