WordPress.org

Ready to get started?Download WordPress

Forums

how do I add a customized .php file to the theme? (3 posts)

  1. bubazoo
    Member
    Posted 7 years ago #

    how do I add a customized file to a template?

    I want to create a popup window, which doesn't have the header stuff included in it. The theme I am using is the simple-green theme that only has an index.php and comment.php files, so I tried to add a new file called
    spammsg.php, and I am getting an error on line 1
    on the

    <?php get_header(); ?>

    line. says "call to undefined function"

    thats what the instructions said to do, so how do I add this file to the template? its in the same directory as the other template files, I am confused?

  2. moshu
    Member
    Posted 7 years ago #

    If that theme has only an index and comments template files... then the instructions won't work :(

    You need to slice it up - to be able to call the header.php into other template files, too.

  3. bubazoo
    Member
    Posted 7 years ago #

    1. I am too lazy to take the time to slice it up
    2. all I want to do is post 2 sentences in a popup window, but it needs a few wp functions to display information to the user, about why I require registration to post comments.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.