• I’m trying to create a new page. What I want to do is duplicate the main page of my blog, and on the duplicated page, instead of having the blog entries, it will have just static text. I still want it to have the sidebars and all (footer.php in my theme) and the header and everything, I just want it to not show the blog entries and instead show static text that I can edit inside of WP.

    I have tried duplicated index.php and that has not worked, nor has duplicated pretty much every other page. There must be something that needs to be done otherwise.

    Hope this is not too confusing. ??
    Check out this example: https://tinyurl.com/67xx2

    Thanks

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter bang

    (@bang)

    Do you mean when I create the page (write>write page), I select a “Page Parent” and it will use that template?
    I’m lost.

    I could edit the page in a text editor and get rid of the unnecessary stuff i don’t like, but the url to the page is “site.com/?page_id=5” so i don’t know the actual php file to edit to effect “page 5”.

    What you need to do is copy everything in the Main template (aka index.php). Then paste it into a new document and name it page.php. Then delete out the portions you don’t want, such as the comments tag and the author tag, etc. Then upload that page.php into the theme you are using.

    Thread Starter bang

    (@bang)

    Oriecat: I just did that, and tried to load up the page to preview how it looked (I didn’t edit anything, just renamed it) and I get this:

    Fatal error: Call to undefined function: get_header() in /home/***/public_html/***/wp-content/themes/theme/page.php on line 1

    Of course, line 1 is “<*?php get_header(); ?*>”

    Nobody ever reads the Codex???
    What you made (page.php) is a template = empty skeleton file of your future Pages.
    You cannot see “how does it look”, you have to put content in it. Go and Write a Page, then look at THAT, not at the empty template.

    Thread Starter bang

    (@bang)

    Ok. So how would I go about connecting a page I write in write>write page to the template I just made?
    I saw nothing about what i’m trying to do in Codex.

    Sorry, but I still don’t see where you are going with this. I see the way I would manipulate the output on the page I duplicated, but I do not know how to tie the template I just made with a page I write from Write>Write Page.

    That’s when Codex comes handy ??
    If you have only one Page template (called page.php) WP recognizes its presence, and if you write a page (Write > Write Page) this page-template will be used to display it. Am I clear? Does this help?

    On the other hand if you decide to make more Page templates (again, see Pages in Codex – they need a few special lines at the top) then on the Write Page admin section you will have a drop down menu that offers the possibility of choosing one of templates for displaying the content you Write into the Page.

    Thread Starter bang

    (@bang)

    It worked great. Thanks a lot moshu, and everyone else. ??

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘New page?’ is closed to new replies.