Forums

[resolved] New Page wont utilize page templates... (12 posts)

  1. JanChristian
    Member
    Posted 1 year ago #

    I made a new page and want it basically blank so I can just add a few pictures. I made a new Page Template and selected it, but the page shows up as a post with attachments that I didn't attach.

    Here's the template:

    <?php
    /*
    Template Name: PhotosPage
    */
    ?>
    <?php get_header(); ?>
    <div id="site_content">
    </div>
    <?php get_footer(); ?>

    and the page:
    GrenadeGearUSA.com/colors

    any idea what is wrong?

  2. @mercime
    Member
    Posted 1 year ago #

    You need to add at the very least <?php the_content(): ?> tag

    <div id="site_content">
    <?php the_content(): ?>
    </div>
  3. JanChristian
    Member
    Posted 1 year ago #

    I added that but it didn't change anything.

  4. @mercime
    Member
    Posted 1 year ago #

    I've just looked at the page source of grenadegearusa.com/colors and you're not using the template there if the content of that page is per HTML structure you posted above as Photospage page template.

    Edit "Colors" page and go to right sidebar, choose Photospage in Page Templates dropdown and click "Update"

  5. JanChristian
    Member
    Posted 1 year ago #

    The Page Attributes are as follows:

    Parent: (no parent)
    Template: PhotosPage
    Order: 0

    What confuses me is when I try different templates and update the page, nothing changes.

  6. @mercime
    Member
    Posted 1 year ago #

    Change theme to default twentyten theme. Edit Colors page and change page template "One column, no sidebar", update page and see how it's working in your installation. If the template doesn't work for you, you will need to re-upload WP files to your server because your install is not working right.

  7. JanChristian
    Member
    Posted 1 year ago #

    I just tried that and there is no side bar but it still shows up as a post that people can comment on. It also shows my "COLORS" header button as an attachment, any idea why?

    I think I may just start over...

  8. @mercime
    Member
    Posted 1 year ago #

    but it still shows up as` a post that people can comment on.

    ... because commenting is on. You can change setting sitewide or change comment settings in individual Page or Post.

    I think I may just start over...

    Good luck.

  9. JanChristian
    Member
    Posted 1 year ago #

    ... because commenting is on. You can change setting sitewide or change comment settings in individual Page or Post.

    Well I'm using the same layout for another site and the "PhotosPage" template produces a page that does not act as a post: janchristianphoto.com/photos

    The same settings (as far as I can tell) are used for both sites but the Grenade Gear one is behaving differently.

  10. @mercime
    Member
    Posted 1 year ago #

    GrenadeGear Colors page is now using the Photospage Page Template unlike yesterday. Clear server and browser cache. It looks like you added content already

    Exterior
    Lorem ipsum dolor sit amet, etc
    
    Liner
    Lorem ipsum dolor sit amet, etc
  11. JanChristian
    Member
    Posted 1 year ago #

    Yeah yesterday morning I "fixed" it, I don't know how though. Since it was the "Colors.png" that kept showing up as an attachment, I went to its "update media" page, filled in some alternate text, caption, etc. then clicked update. After that, the colors page worked fine. Weird!

    Thanks for your help

  12. @mercime
    Member
    Posted 1 year ago #

    Cool :-)

Topic Closed

This topic has been closed to new replies.

About this Topic