How to use a html file as a post in wordpress?

Discussion in 'HTML & Website Design' started by sourabhkejriwal, Mar 5, 2013.

  1. #1
    Hello, I have a html file (which performs a simple ajax function), which I want to use in my WordPress site's first (static) post... How can it be done ? Thanks in advance
     
    sourabhkejriwal, Mar 5, 2013 IP
  2. icey7

    icey7 Well-Known Member

    Messages:
    122
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    128
    #2
    Hi

    While inside the create post editor, simply switch to HTML mode and copy your code into the body field.

    thanks
     
    icey7, Mar 5, 2013 IP
  3. sourabhkejriwal

    sourabhkejriwal Member

    Messages:
    85
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #3
    I tried this but this isn't working...while switching to visual mode it is still showing the html codes...
     
    sourabhkejriwal, Mar 6, 2013 IP
  4. icey7

    icey7 Well-Known Member

    Messages:
    122
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    128
    #4
    Hi

    What kind of code are you trying to add ? Are you certain your in HTML view mode ?

    Did you try adding the code then hitting "preview changes" to test if your code is working ?

    thanks
     
    Last edited: Mar 6, 2013
    icey7, Mar 6, 2013 IP