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 https://www.effinghamministorage.com/prices/

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?

Thanks
burnedfacelessAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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"
[uniquename_prices]

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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
burnedfacelessAuthor Commented:
Thanks man, that was an excellent response.
1
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.