Tintation on Facebook Tintation on Twitter Tintation on StumbleUpon Tintation on Google Tintation on LinkedIn Tintation on YouTube Tintation on Delicious Tintation Articles RSS Feed Send E-mail to Tintation

Tintation – The Web Resources Blog » Informative, Program Codes, WordPress Tutorials » How To Install SureHits Code Into WordPress Theme

How To Install SureHits Code Into WordPress Theme

How To Install SureHits Code Into WordPress ThemeNot long ago I need some professional help with my insurance website that is running a WordPress Theme. I signed up with SureHits.com company in order to have a nice functional insurance form on my Insurance site. When I got the code to install into my site it wasn’t that easy to figure out its proper installation. I spent at least couple hours trying to figure out where and how to use it properly. Also, I searched the web and found nothing useful. On a simple HTML website if would probably be much easier, but in WordPress themes it’s a little harder, especially if you want it to look and work professionally.

So, then my friend Valik Rudd helped me out with my WordPress blog difficulties. By the way if you need him to help you out with your WordPress issues, then you can find him here at FlyNewMedia.com and he will let you know how much it will cost and if he’s able to take your order. So, let’s begin with the tutorial which worked for my specific blog. Remember that you can follow this tutorial at you own risk. If you are not sure about programming php and wordpress, then don’t do it. Otherwise if you are ready, let’s go on.

SureHits instructions preview.


1. – Open your WordPress theme’s page.php file and Save it As a new file with another name. (For this tutorial let’s call it insure-auto-page.php) This is going to be our Page that shows the insurance list results. In SureHits STEP 2 Instructions they call it results.html file OR whichever file you specify.

Save As New PHP Page file.


2. – Now, let’s add some code into our newly re-created page file which we called insure-auto-page. Just before the get_header php code add the code similar to the one in the preview below. Make sure to remember what you called this template name.

Add php code for the custom page template.


3. – Find the_content php code and comment it out by inserting two forward slashes to make it start out like this: //the_content

Find the_content php code


4. – Then, after this the_content php code’s closing tag make a new line by pressing Enter key and paste the code from STEP 2 that your SureHits account gave you for this specific page. (For instance, if you want this page to be your Automotive Insurance Page, then make sure that you have selected the related choice from the top menu choices of your SureHits Account list which should be in the top middle location of the Installation Page.) After you pasted that code, Save the file and Upload it to the Internet. (It should be located in the same directory with the normal typical page.php file)

SureHits Code from step 2.


5. – Now we will need to paste the SureHits code from STEP 1 into specific location of the header.php file, but we will do it in a unique way so that a specific form will show up in it’s unique category. Open your header file and decide where exactly you want it to show up on your WordPress blog or website. Look at the code in the image below, this is what my friend helped me to create, or more like he created it for me :) Pay close attention to the post ID numbers and the link of the form’s action location – both of these will need to be changed accordingly to the appropriate insurance category.

Edited WordPress, php, and SureHits code.


6. – To Find which post ID to insert in the proper places I went to my WordPress Admin and opened the Pages Section. Then, let’s say if people are on the Automotive related page I want the Auto related insurance form to appear, so then to find that Automotive page’s id just roll over your mouse pointer over the title of that page and your browser should show its address. In the address of that page your should see the post ID number. That is the number I take and put into the code we entered into the header previously.

Finding post ID.


7. – Now, for the form action location which need to be entered accordingly after you enter the post ID in the header code, let’s create a New Page in WordPress first. So, go and add a new blank page in WordPress and pay attention to its url, because this is the url you will input into the form action location. Also, remember we created that page in the blog’s directory which we called insurance-auto-page.php and remember how I told you to remember the template’s name you gave it? Well now, choose that template out of the choices on the right of the Page Attributes options. Save your newly added page.

Adding New Blank WordPress Page


8. – Well, I believe that is all. My friend Valik also had to help me out with the theme’s menu because these newly created pages which are not suppose to show up in menu did show up. So, he helped me to find a solution for that so you may need to talk to your programmer or tech to help you out on that, or hire someone who knows how.

Anyway, if you go to Quote-Insurance-Online site you’ll see that all of the from in the top right corner look exactly the same no matter on which page you go to; Auto Insurance, Motorcycle Insurance, Home Insurance, Health Insurance, Life Insurance, Small Business Insurance, or Other Insurance. I may change my form’s looks to work differently in the future. But for now, that form is only changing according to those pages in the background where you can’t see it. Also, depending on the user’s current page the form will show appropriate insurance companies for them to choose from. Please be advised NOT to click on any of those insurance companies results if you are just playing around with my site’s form.

Written or Posted by

I am an Enthusiast of Computer Graphics, Web Graphics, SEO, and Codes. I love designing and developing my own websites and blogs. At the same time I love seeing and sharing about other professional, unique, and high quality designs that people make for their websites, graphics, and software.

Filed under: Informative, Program Codes, WordPress Tutorials · Tags: , , , , , , , , ,

Leave a Reply

You can use these tags, but remember Spammy Comments Will be Spammed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>