Forums

Custom page template (6 posts)

  1. tdhp
    Member
    Posted 4 months ago #

    I designed a custom HTML page in Dreamweaver as homepage.htm using homepage.css and image folder new_images. I uploaded the three files to my theme folder, changed the homepage.htm file to a .php file while putting <?php /* Template Name : home page */ ?> to create a new page template. I created a new page and used the new page template, but when I view the page, the words are there but there is not CSS styling and no images. It's like the .php file isn't linking to the CSS file or the image folder. What am I doing wrong?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    Your entire approach is wrong. See custom page templates.

  3. alchymyth
    The Sweeper
    Posted 4 months ago #

    at least make sure to use absolute file paths to the css and to the images (untested).

    it might help, if you could paste the full code of the template into a http://pastebin.com/ and post the link to it here.

  4. tdhp
    Member
    Posted 4 months ago #

    @esmi. I've read that page many times but still don't get it. Forgive me, I'm new.

    @alchmyth - here's the link to the php file http://pastebin.com/EJU17Nbt

  5. alchymyth
    The Sweeper
    Posted 4 months ago #

    as I assumed - your 'homepage.css' needs tha absolute path to its location - is it within the theme files?

    if the location is in the theme files, try to work for instance with the wordpress function: get_stylesheet_directory_uri() http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri

    also all the 'swap' images need absolute file paths.

  6. tdhp
    Member
    Posted 4 months ago #

    Thanks. You're probably rolling your eyes, but I'm still so new at this. Can you talk to me like a little kid, like what would be the code to insert into this file that would call up the CSS and images. I understand that it needs it's absolute location, but the stylesheet uri stuff is over my head.

Reply

You must log in to post.

About this Topic