Skip to content

Forum in maintenance, we will back soon 🙂

Html, CSS, Javascri...
 
Notifications
Clear all

Html, CSS, Javascript file placement for How To Build a SaaS on WordPress

27 Posts
4 Users
20 Reactions
659 Views
(@kakil)
Posts: 8
Member Registered
Topic starter
 

Hi Hasan, 

I've implemented the WordPress SaaS setup that you outline in your course "How to Build a SaaS on WordPress".  Everything is in place and working.  However, I'm a little confused about the setup of the Frontend UI.  For the frontend example you provide us with 3 files:  HTML, CSS, and Javascript.  You explain how you use the HTML file, but you never say what you do with the CSS and Javascript files.  

Where are you placing the CSS and Javascript files?  Are you adding them inline within the HTML page or are they in their own folder on the server or somewhere within the WordPress directory structure?

 
Posted : 02/02/2024 9:45 pm
SSAdvisor reacted
Hasan Aboul Hasan
(@admin)
Posts: 1256
Member Admin
 

Hi @kakil, you can go with both. You can paste them within the same HTMl block on the page, or you can host them online and link to them.

I use the second approach, I use Kinsta free static site hosting to do so.

 
Posted : 02/03/2024 10:36 am
(@kakil)
Posts: 8
Member Registered
Topic starter
 

@admin Ok, so you are creating a static page for each tool, right?

 
Posted : 02/03/2024 10:39 am
Hasan Aboul Hasan
(@admin)
Posts: 1256
Member Admin
 

@kakil yes, but I use the same CSS styling to make things easier.

each tool has an HTML and JS code, that they are also somehow similar in many tools as they have the same structure and logic

 

 
Posted : 02/03/2024 10:43 am
SSAdvisor reacted
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@admin I don't remember that you mentioned Kinsta or not.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 02/03/2024 6:05 pm
Hasan Aboul Hasan
(@admin)
Posts: 1256
Member Admin
 

@ssadvisor it is just the web hosting service, he can use any.

 
Posted : 02/03/2024 6:52 pm
Dim2001 reacted
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@admin true but any that are "free" to use is a blessing.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 02/04/2024 5:34 am
Hasan Aboul Hasan
(@admin)
Posts: 1256
Member Admin
 

@ssadvisor yeah the static hosting on kinsta is free.

 
Posted : 02/04/2024 7:36 am
(@appanna-m)
Posts: 15
Eminent Member Customer Registered
 

@OP I wonder if you managed to figure it out?

@all I am stuck in the same step. I am trying to figure out the best way to go about this. My assumptions (don't actually know how it works) of possible approaches are:

  • Upload all 3 files in the hosting service. I use BLuehost, so maybe I should attempt to upload there?
  • Edit the CSS directly inside the wordpress console? I am worried this might break things.
  • Upload the 3 files inside wordpress using FTP ?

If you can mention some steps about how to go about the right approach, that would be great!

 
Posted : 03/16/2024 2:20 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@appanna-m I think your option 2 would be best but options 1 and 3 are just as viable. Just do a backup before doing anything else so you can go back to the original easily.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 03/16/2024 9:45 pm
(@kakil)
Posts: 8
Member Registered
Topic starter
 

@appanna-m  Hi, I did figure it out.  This is my assumption:

@admin created a folder on the web host for his tools.  

For instance a "tools" folder inside the public_html directory on your web host.  Inside that folder you will place a folder for your css style sheet(s) because the css style sheet will be used by all your tools.  Also inside the tools folder you will create individual folders for each tool.  Inside the folder for each tool you will create your html and javascript files because those files are specific to each tool.

Here's what the directory tree will look like

Screenshot 2024 03 17 at 4.44.57 AM

In the above you will see that I have folders for my css style sheet, an AI Keyword Tool, and a Domain Name Generator Tool.

For example inside the AI Keyword Tool directory I have the following files:

ai_keyword_tool.html
script.js

Now you can access the static page and test your tool:   https://yourDomainName.com/tools/ai-keyword-tool.html

Here's and example of my HTML header so you can see where I link to the style sheet, styles.css and the javascript file, script.js

<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="https://kitwanaakil.com/tools/css/styles.css" />

    <link
      rel="stylesheet"
      href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css"
    />
    <script defer src="https://kitwanaakil.com/tools/ai-keyword-tool/script.js"></script>
    <title>Keyword tool powered by AI</title>
  </head>

 

Ok, once you verify that the tool is working properly and the tool is looking good you can then add it to WordPress.

 

Add any widgets you like to the page like a Title, Heading, etc.

Add an HTML widget to the page.  Copy your HTML from your static webpage in your tools directory into the widget.  Everything from the "<!DOCTYPE html> to the </html>

Save the changes in Elementor and now you're good to go.

Follow the exact same steps to create each additional tool.

I hope that helps.

 
Posted : 03/17/2024 9:18 am
(@appanna-m)
Posts: 15
Eminent Member Customer Registered
 

Thanks for the detailed response @Kakil! I am going to give this a shot and update.

 
Posted : 03/17/2024 9:33 am
SSAdvisor reacted
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@kakil thanks for the detailed explanation. This will surely help others.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 03/17/2024 1:40 pm
(@appanna-m)
Posts: 15
Eminent Member Customer Registered
 

Works like a charm, I was able to add the tool to my site! Thanks again @Kakil.

Few edits:

Another question, once the tool is on my website, I am still getting the login error (although I am logged in). Is this expected?

 

 

 

 
Posted : 03/18/2024 2:07 pm
Hasan Aboul Hasan
(@admin)
Posts: 1256
Member Admin
 

@appanna-m good.

No if you are logged in, it must not show you the login error. 

can you send a screenshot of how you are handling login in the code snippet, and what is the error you are getting in the frontend please

 
Posted : 03/18/2024 2:27 pm
Page 1 / 2
Share: