Support » Plugin: WP Custom HTML Page » Where to put ‘assets’ folder?

  • Resolved debpress

    (@debpress)


    Hello Milos,

    I have hand coded a landing page for my WP site with HTML, CSS and JS. the HTML file is in the root and the CSS and JS files are stores in ‘assets/CSS’ and ‘assets/JS’ directories.

    I want to know
    – where to put the ‘assets’ folder within my WP File System so that I can link to those files from within your plugin?
    – what would be the relative url like?

    TIA

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author kr4ft3r

    (@kr4ft3r)

    Hello. The best way would probably be to create assets folder at root of WP installation. Then you can call assets using their true absolute path (https://domainname.com/assets/image.jpg), providing webserver is configured to allow this for all file types you would want to access.

    Second option, as for just textual assets (css and js), I haven’t tried this but you may be able to create these as custom “HTML” pages and assign to them any url you want, just end it with “.css” and “.js”, but once again I haven’t tried this, it is safer bet to just copy files into an existing folder as suggested above.

    Relative URLs would not work as URLs of custom HTML pages have nothing to do with location in file system.

    If I have to upload the assets to the file system root, then I can upload the HTML page as well.

    I think I was wrong about – how this plugin works. I was thinking that it will retain the WP template and publish the custom html page just as any other page created from within WP.

    Does your plugin strip away all of WP template engine (header,footer etc.)?

    Plugin Author kr4ft3r

    (@kr4ft3r)

    To quote plugin description:

    WP Custom HTML Pages plugin has two functionalities:
    1 – Create a custom HTML document output at a custom permalink address, completely bypassing WordPress templating. This is useful in cases when you just want to output some HTML without uploading the page to the server.
    2 – Create a shortcode which outputs your custom HTML.

    So if you want to load WP template as well, you would use shortcodes inserted into standard page content, rather than make a full HTML page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.