How to convert a site into WordPress

I want to rebuild a site I built a long time ago in WordPress.

I'm wondering how to create the prices and availability page in WordPress

Do I just paste the HTML into the text section of a page editor? And add the JavaScript somewhere (like the theme's footer?)?

Also the availability is stored in a database and updated via an admin page that has HTML number inputs. Can you tie the availability into the WordPress backend?

Who is Participating?
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
You can do this by creating a shortcode in your functions page or by creating a plug in.

To create a short code it will look like
add_shortcode( 'uniquename_prices', 'uniquename_prices_func' );
function padas_weekly_schedule_func( $atts ){

    $html = "<div class='col-sm-12'>";
    $html .= "<p>Hello World</p>";
    $html .="</div>";
	return $html;

Open in new window

Now on any of your wordpress posts or pages add below in the editor to get, "Hello World"

Open in new window

Now take that a step further
add_shortcode( 'uniquename_prices', 'uniquename_prices_func' );
function padas_weekly_schedule_func( $atts ){

include_once $_SERVER["DOCUMENT_ROOT"].'/path_to/your_custom_php/uniquename_prices.php';

    $html = getMyPrices();

	return $html;

Open in new window

On your uniquename_prices.php you can create php code that you are familiar with to generate the html that pulls from your database. Wrap your output in a function called getMyPrices(); or whatever you want. This keeps the output in scope. If you created a page that didn't use a function, you would not have control of were the output shows up on your page or even which page it outputs to.
burnedfacelessAuthor Commented:
Thanks man, that was an excellent response.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.