• Resolved LostInNetwork

    (@lostinnetwork)


    I need to create a page with an event calendar on it.

    I have created file.php in my themes directory. I have also edited my themes header.php to include a link (in the page list) to this new file.php. I have typed

    < ? php function_call() ? >

    in the file.php.

    When I click on the link to open this page, I just get an empry page with error messages complaining about “undefined functions”.

    How do I make the functions to work?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Download one of the events calendar plugins and see how they do it.
    http://codex.wordpress.org/Plugins/Calendar_Event

    You can use something like my CG-QuickPHP if you want to create a WP Page that calls a single PHP function — it’s good for that (minimalist).

    Also read up on using custom templates, if you want more functional, customized php code for a given page.

    -d

    Thread Starter LostInNetwork

    (@lostinnetwork)

    Thanks.

    I somehow missed the instructions to choose the page template in the create page dialog.

    Once I understood that I don’t need to edit the header.php or anything, but just create a template php-file in the theme directory and choose the template in the editor, the problem was solved.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘php-script on static page?’ is closed to new replies.