Wordpress Add Template to Theme

Add Wordpress template to topic

Open the Topic folder to view your existing page templates. Use a script editor to open it. Adding a new file or template to a Wordpress theme without FTP access

WordPress includes a function that allows you to edit theme and plug-in documents directly from the back end when they are signed in. Until today I had never used this function, because I always had acces to the real data, e.g. via FTP. But today it was different and I was working on a website where I didn't have file system at all.

Changes must be made by accessing the WordPress user interface and working on the content of the documents. The one thing I couldn't do while working on the theme was to make a new template or filename because, to my amazement, the possibility to add existing ones just didn't work.

No way (and no time) to get instant control over the system, so I had to think outside the box. What I did was to get the best out of it. The thing I thought of as a way to add a new FTP -free FTP was this: I'd like to add a new one: I'd like to add a new file without FTP access: Login to WordPress and browse to 'Appearance > Editor'.

To the right you will see a listing of the data items in the topic. To open the content, click on the header.php in your topic to open the content window. Adds the following line of HTML as the first line of the main file: Substitute'your_theme_directory' for, well, the name of your topic folder (duh!) and'your_new_file_name.php' for... yup... You have it... the name of the filename you want to crawl.

Hint: touch() is a PHP feature that is used to set filename change and restore time. However, if the data does not exists, it will generate it what we want. Browse back to'Appearance > Editor' in the WordPress back end and delete the source you added intep 4 to avoid running it again.

Note also that the new filename you just added is included in the right pane of filenames you can work on. This is a new filename that has been designed using WordPress credentials only. You can also use the above step to generate new plugins when you develop them.

Just modify the file path when you run the touch() function to correspond to that of the plug-in.

Mehr zum Thema