• I simply want to create a static (‘physical’ page – timeline.php) within my theme directory. I want it to use the layout tools etc that my other WordPress pages do – index.php, single.php or page.php etc.

    But I get errors when I use the get_header(); and other functions, it breaks. The above mentioned pages look nearly identical to the timeline.php I created, but they actually work.

    I would create this page through the WordPress UI, but it filters out javascript and other tags etc. I am trying to utilize a timeline javascript widget on a page. I would think that creating static pages should be a fairly easy thing to do, what am I missing?

Viewing 7 replies - 1 through 7 (of 7 total)
  • WordPress Pages are for static content, so why not just create a Page and put the Javascript on that?

    If it needs somehow to be different from your other pages you can create a new template. If you don’t want it to be listed with other pages you can exclude it from the normal page list.

    Thread Starter baiguai

    (@baiguai)

    At least when I use the WordPress editor, it modifies my code, removing multiple line breaks, or embedded objects like Flash. I had tried this using the html editor and none of the javascript was working when I saved it. I can try to paste the code directly into mysql, but I would prefer to have a physical file, so I can easily determine the paths to its related script files etc.

    … or you could just disable the WYSIWYG editor and safely paste in your javascript or objects.

    Users -> Your Profile. Bottom checkbox, uncheck and save.

    Thread Starter baiguai

    (@baiguai)

    That might do it! Thanks, I’ll try that.

    Thread Starter baiguai

    (@baiguai)

    It is still messing with my code, inserting line breaks etc – even if I paste it directly into the database.

    Or keep using the wysiwyg editor but go to the code view when you’re inserting script. There’s a button on the wysiwyg editor for code view — maybe says “html”?

    Thread Starter baiguai

    (@baiguai)

    I have used the html editor, but when I save it, the code gets changed. Can I set it to not insert line break codes just on this one page?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Static Page Creation’ is closed to new replies.