• Hi all,
    I created some external HTML pages and inserted in WP via upload (or direct copy via ftp).
    When I call them with menu they work perfectly, but now I want to “hide” the full path, e.g. with a permalink.
    Now the path is: “”http://www.XXX/wp-content/uploads/newhtmlname”.

    I see three options:
    1) modify the php and then add an echo path to the new pages
    (personally dislike to touch the php structure, but …)

    2) create a new folder where to move the new files, or put them directly in main WP folder:
    e.g.: “http://www.XXX/newhtmlname” (main folder case), or “http://www.XXX/newfolder/newhtmlname” (new subfolder case)

    3) add a new page with WP system (like my all other standard WP pages) and in the new page call the new html via iframe.
    I already tested this solution, the method should be as follows:

    a) in my main css prepare the new page as “blank” (delete the page title, no header, black background, one column 100% wide, etc.),
    b) then in the new page add only:

    <style type="text/css">body {margin:0; overflow:hidden;}</style>
    <iframe src="http://www.XXX/wp-content/uploads/HTML/newhtmlname" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; 
    width:100vw; height:100vh; border:none; margin:0; padding:0; overflow:hidden; z-index:999999; display:block;">fallback text</iframe>

    Which should be the best solution in your opinion?
    All the solution work, but I’d like to have your opinion on the best one (or other eventual solutions).

    Thank you.
    Mauro

Viewing 4 replies - 1 through 4 (of 4 total)
  • In my opinion,
    the best way is #4, which you didn’t mention: create them as normal pages in WordPress.

    #1 doesn’t solve any problems.
    #2 is easy, but the new pages have no way to show the WP menu (to integrate with existing WP pages) or to be found in the search.
    #3 won’t be found in a search and is a lot of trouble for hiding the rest of WP.

    Thread Starter Mauro Vicariotto

    (@mrovic)

    Thank you Joy,
    actually if I did not make those pages as standard pages there is a reason.
    On 14 pages 12 are standard and 2 aren’t, because too large and complex projects.
    I don’t bore you explaining, just consider that they contain 18 js and 3 jquery functions, two ext css and some php, 250 k of page.
    I want to handle them as external.
    I chose the third, because actually not so interested the public finds in a search.
    I don’t understand what you mean by “hiding the rest of WP”, could you explain pls?
    Tks.

    Well, in #3 you are putting it in a WP page, but using CSS to hide what your theme provides. Having it in a iframe is not very responsive (mobile devices).
    At least with #2, you get exactly what you coded. No WP integration (menus, etc.) but the way WP works is that the .htaccess file says to load WP only if the file does not exist. So it is easy to put standalone files in with WP.

    Thread Starter Mauro Vicariotto

    (@mrovic)

    thank you, I didn’t consider the mobile devices, u are right.
    I will use the new folder solution and see… or put them in main WP folder (?) what do you think…
    http://www.ars-vivendi/myhtmlfile (same where is the .htaccess)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Insert some html pages’ is closed to new replies.