0

I am a WP beginner and am trying to upload a web module to a wordpress site. The site is a landing page, and a link on the landing page leads to a demoable web app. The web app was custom written in HTML and JS and I need to upload those files to this route in the WP site.

Does anyone have any suggestions/insight/advice?

Thank you!

2 Answers 2

1

All you need to do is create a custom page for your theme. Here is a very brief example:

Create a file called: page-example.php

<?php 
/* 
Template Name: Example Page
*/
?>

<?php get_header(); ?>

The html code will go here.  Don't add the <head> or <body> info.  

<?php get_footer(); ?>

The next thing to do is add the following to your functions.php file:

function load_example_scripts() {
wp_enqueue_script('moment', get_stylesheet_directory_uri() . '/js/example.js'); 
}

add_action( 'wp_enqueue_scripts', 'load_example_scripts' );

Now upload the page-example.php to your main template folder (where header.php, footer.php, functions.php are)

I usually add a folder to my themes named "JS" and put all jquery scripts there. So upload the example.js file to the "JS" folder of your theme.

Finally, go to the wordpress admin, and edit the page where you want this to appear and on the side menu under "templates", select "example".

I would have to see the exact code to give you more help, but that is the basic idea.

0

Welcome to WordPress!

Your best bet would be to setup a localhost server Windows or Mac

The install a copy of WordPress, and study how the default themes are put together, start looking at how template tags work, and how the structure of the themes works.

After that you can start putting your HTML web pages into WordPress by building your own theme.

A word for the wise, don't go buying a "premium" theme to study and learn from, they are more often than not overly complicated, bloated with useless features and very hard to work with.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.