• 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 15 replies - 1 through 15 (of 22 total)
  • That’s easy. Just use the Theme Editor which can be found under Presentation.

    Then edit your page template, and make sure there is a < ?php get_sidebar(); ?> and < ?php get_footer(); ?> and the end. In case you don’t want that on all of your pages, just put an if at the end. Something Like if( is_page(‘pagename’) { include the things }

    Did you go into Write Pages and add your static content? And it didn’t work? Or are you just trying to create a page template?

    Thread Starter bang

    (@bang)

    Thank you both for your replies.

    Oriecat: Once I get the main blog page sucesfully duplicated, then I can add my static content in the WP admin easily. The problem is getting a page duplicated (or making a new one that looks just like the index).

    Eridan: I made a new page, test.php, and inside that file I put all the php calls to include the header, sidebar and footer. Where would I put this file? I have the feeling that if I put it into ‘domain.com/test.php’ it will not work, and if i put it in ‘domain.com/wp-content/themes/theme/test.php’ i’m not sure if it will work either.
    I will try it. Thanks

    What I ment was that first you create a page using Write -> Write Page (using wp-admin), after that you edit the Page Template (Presentation -> Theme Editor) and add get_footer and stuff there.

    Thread Starter bang

    (@bang)

    Edit: Misunderstood

    Thread Starter bang

    (@bang)

    Eridan: I didn’t even notice that function in WP. Very useful.
    It automatically shows “posted by:” and a place for comments as well, though. Is there a way to not have it show posted by, and the comments area, and just show whatever I wrote in the text area to build the page?
    I am guessing I could do this in presentation>theme editor, but the page I created does not show up there for some reason.

    Thanks a lot for the help.

    eridan likes to go the other way around ??
    The normal steps are: make a page.php = Page template; it can be a save as for index.php of your theme; delete all the tags that you don’t need (date, category etc.)… you can even repeat this process 10 times giving different template names to the new files – and at the end you’ll have 10 different Page templates ??
    Then go to write Pages > and select the desired Template from the drop-down menu.
    For an overhaul of a template I wouldn’t use the built-in editor, that’s just for minor corrections, IMHO. (or not H!)
    Work in a text editor.

    See the “Page to Front” plugin at https://codex.www.ads-software.com/Pages (under “WordPress as a CMS”). Will that do what you’re trying to do? I got it to make a Page the home page of the blog site.

    Lois

    desemweb, the OP never said anything about wanting a Page as homepage. It was just about creating/writing Pages. What was described in the first post was “how to create a page template that looks like my index.php but has ‘static’ [what a misnomer] content – i.e. I can put content in through the Write Page feature”.
    So, I just answered THAT question above.

    Moshu, I wasn’t sure from the first post. It sounded to me like the OP wanted a home page that looked like the rest of the blog but had static content rather than blog entries, so I suggested one way to do that.

    Our previous posts were posted 5 seconds apart, so I hadn’t seen your previous post anyway.

    Lois

    Question on all this – if you write a page and do not have a page template, it will still use the Main template, correct? That’s why I think eridan and I were trying to see if bang had even created a page yet. Until you have a page made and see how it looks, then you can see what you want to edit out, if anything. If you don’t want to edit anything out, you wouldn’t need a page template. Right? Or am I misunderstanding something?

    Bang, let’s clear up exactly what your intentions are. Do you want this special page to be your home page, always displaying the same text? Be very specific.

    Thread Starter bang

    (@bang)

    That feature eridan showed me is perfect. I want it exactly like that but without the ‘posted by:’ ‘comments’ etc etc
    Like I said, I assume I could do this in presentation>editor but the page I created is not in there….is it supposed to be?

    To make it clear and as simple as possible, what I want is exactly what eridan showed me, but without there being ‘posted by’ etc – I just want it completely blank except for the text i posted in the new page.

    Quod erat demonstrandum: s/he needs a Page template ??

    @oriecat >
    Yes, if there is no page template, the Main (a.k.a. index.php) will be used. See Template Hierarchy in the Codex. For those with a visual mindset: a visual anatomy of the template system.

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