WordPress.org

Support

Support » Themes and Templates » [Resolved] Custom Page Help

[Resolved] Custom Page Help

  • I have created a custom theme and used it multiple times as a single landing page using home.php as the landing page. Works fine no issues.

    Now I’m trying to add a second page with it’s own page template and something is not working correctly. I’ve created another page template and called it sedation.php. I’ve edited the template name in the sedation.php file. The page shows up in my templates in the dropdown list of the dashboard – all good.

    If the page is still in the “draft” mode and you view it and you can see it perfectly but once I “publish” the page then I get a page error.

    I’m guessing I am missing some code relevant to pages somewhere in my theme but I’ve researched a looked a can not figure out what it is. Trying to make this site live and can not do it until I get these pages viewable.

    Thanks for the help.

Viewing 15 replies - 1 through 15 (of 19 total)
  • can you please post the page error you get?

    Sorry, it’s not really a page error – it’s a “page not found”.

    Thanks

    esmi

    @esmi

    Forum Moderator

    What are you actually linking to? Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of assistance other than semi-wild guesses.

    Here is a link to the homepage.

    http://whistlerworks.com/clients/winterssmilemakeover/site/

    Any of the page links at the top are pages that have different page templates. When you preview the pages in draft mode they appear as they should when you publish the pages – they then say page not found.

    esmi

    @esmi

    Forum Moderator

    I think this is an issue with your root site’s .htaccess rewrites – not your templates. Looks like all calls to any page other than the sub-folder root are being directed to your main site.

    there is no .htaccess file.

    solution?

    esmi

    @esmi

    Forum Moderator

    Yes there is. Your main site uses custom permalinks.

    Well I didn’t make one. If there is one I’m not sure where it is, and I’m not clear on how that is affecting my pages not being visible and I’m not sure what the solution to the problem is.

    esmi

    @esmi

    Forum Moderator

    WordPress creates it automatically when you set up custom permalinks. Try looking in your root domain folder using FTP – but do ensure that your ftp client is configured to show all files. Many clients hide .htaccess files by default.

    I use cyberduck. I’ve looked through the root folder and can not find an .htaccess file, which is why I did not think there was one. If cyberduck is hiding the file how do I make it visible and what do I need to change or add within the file.

    The show hidden files is checkmarked in cyberduck and I don’t see a .htacces file.

    esmi

    @esmi

    Forum Moderator

    What sort of server are you using – Windows or Linux?

    It is setup to use Linux. I found the .htaccess files in some of my other sites in cyberduck…. even though show hidden files is checked I still had to do a search. When I did that on the site I’m working on no .htaccess file came up so I made one put all the same text in it as my other sites. Refreshed my files and the pages still do not work. I’ve tried switching themes and still the same problem. In preview the page shows up. When published the page is not found. Extremely frustrating.

    esmi

    @esmi

    Forum Moderator

    It’s the .htaccess file in your root domain that it probably causing the problem.

    yes, it is in exactly the same place as my other websites.

    winterssmilemakeover/site

    Then you have all the files…

    .htaccess
    index.php
    wp-admin
    wp-content

    etc.. etc.

    btw….I really appreciate your help because I am stumped and trying to make this site live.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[Resolved] Custom Page Help’ is closed to new replies.
Skip to toolbar