Is it possible to add a new php file to wordpress template and add header,footer and sidebar of that template in it???
If you are talking about self hosted Wordpress, then yes, you can edit your theme anyway you wish...it's yours. You don't need permission.
No i meant that i tried to add a php file named upload.php into my wordpress theme ,i added funcions of get_header(); get_sidebar(); get_footer(); but when i tried to run that page the error occured that Fatal Error: Call to undefined function get_header() Please help me resolve this problem
OK..that's cause you did it wrong. But there is no way for us to know what you are trying to do, or what function you are trying to add. You are kind of over extending yourself...i can see installing plug ins and themes and slight file edits, but you are trying to custom edit functions without any knowledge of code or PHP? Why don't you try telling us specifically what you are trying to do or change.
I am sorry may be i couldnt ask with proper words.ok i try to ask again, My question is that in wordpress theme we have pages like index.php,header.php,footer.php etc, and in admin side we write posts ,pages etc. I had made a submit form in post using php, in the action field of that form i wrote the path to a new php file that i added named abc.php. When i submitted the form the form was submitted to abc.php but the design of that page was blank ,i wanted the header,footer,sidebar etc of that abc.php to be like my wordpress template. Please tell me how can i include the header,footer,sidebars of my t emplate to this abc.php file???? I hope you got it now
There is a much easier way to have a form. you could use any one of several form plug ins such as Contact Form 7 and build any kind of submit form you want. Second. There is an easier way to include PHP in your posts. You can use the Exec PHP plug in. That will allow you to insert PHP code into you posts, pages and side bars As far as trouble shooting you specific problem, it sounds more like an error with your PHP coding, than it does anything having to do with Wordpress. I still can't answer how to fix it because I have no idea what is in those files that you have added, how you have coded it to call on the function, or what they are supposed to do. But I can tell you this, it very difficult to just start adding home made files into any software unless you know how the core functions of that software operates and know how to edit them properly. Of you are trying to add functions to the way Wordpres operates, you probably need to be editing the core operations and not the theme files. I don't recommend doing any of that because you don't need to do so much work just to have a form in Wordpress. Forms are easy. I'm still having a hard time trying to figure our why you are adding php files and editing code just for a form.
Just to add, if you use Contact Form 7, you can have multiple forms, and also give users the ability to add attachments such as files or images. You set the fields up how ever you want with multiple options. It's a good plug in for forms.
This post helped me a lot. I don`t know how I find it, but this thing made my confused too. Thank you a lot, +rep! - Fusie
Should be quite easy to do this!! Contact form 7 is very simple to use...download and activate plugin, edit settings then insert into page or post with a shortcode. You can play around with field widths etc but overall should be MUCH quicker, easier and less confusing than hardcoding a form and trying to add to your template.