• Resolved nickaster

    (@nickaster)


    I think this is a basic question, but I don’t even know where to start looking in the help files so hopefully this helps out more than one newbie.

    What exactly gets created when I create a new template file? First of all, why must I use FTP to create a new file in my theme? Why can’t I do it via wordpress?

    Let’s say I want a file called “https://www.mysite.com/hello.php

    I don’t want to create a “page” I want a simple HTML file that says “hello” on it and nothing else.

    If I FTP a file into my theme, then it shows up in the editor just fine, but won’t show up anywhere else. Why?

Viewing 1 replies (of 1 total)
  • WordPress does not create physical files, it stores information in a database.

    Creating files on the fly would mean WordPress needs permission to write to those directories, and creating files in such manner is not as effective as utilising a database.

    If you just want HTML on a page, you can do that in WordPress, just create a page via the admin, click the HTML editor and type in your HTML…

    If you want a page that doesn’t include the header, footer and everything else then you can modify your theme to do so…

    In your page.php (the file that displays WordPress created “Pages”) wrap all the code in..

    <?php
    if(!is_page('YOUR-SPECIAL-PAGE-NAME-HERE')) {
    
    THE EXISTING CODE GOES HERE.. (minus the very first and last php tags - <?php and ?>)
    
    }
    else {
    
    the_content();
    
    } ?>

    https://codex.www.ads-software.com/Main_Page

    There’s more information in the codex above then i’ve seen documented for any other CMS or blogging application, so i find it hard to believe that reading through the documentation won’t give you the answers you seek.

    If WordPress is just in the root of your site.

    https://someaddress.com/
    And you want to be able to use..
    https://someaddress.com/hello.php

    There’s nothing to stop you doing so, in fact i have 4-5 files for various pieces of script testing on my local install.

    You can write regular HTML into PHP files if you like to…

    <?php
    ?>
    
    <h1>My example HTML title</h1>
    <p>My example conent.</p>
    
    <?php
    ?>

    ??

Viewing 1 replies (of 1 total)
  • The topic ‘Basic Template Questions or, Where is my page?’ is closed to new replies.