Subscribe via

How to Make WP Greet Box Work on Non-WordPress Pages

Thaya Kareeson
I had to
Creative Commons License photo credit: miss604

A few people have asked me how to make WP Greet Box work with non-WordPress pages.  Luckily there is a way to easily do this and I will show you how in this tutorial:

Requirement

You must have WordPress installed with WP Greet Box plugin enabled.

JavaScript Modification

You will have to make a copy of “http://example.com/wp-content/plugins/wp-greet-box/js/js-mode.js”, modify it, and place it somewhere accessible by your non-WordPress page. As an example, I will place a copy of the file at “http://example.com/non-wordpress-platform/js-mode.js”. Now open “non-wordpress-platform/js-mode.js” and modify the line:

url: "index.php",

to point to your blog WordPress blog index.php.

url: "/index.php",

For example, if your blog is installed under “http://example.com/blog/”, you would change the code to:

url: "/blog/index.php",

JavaScript Placement

There are a few Javascript files that you need to reference to do this. Make sure you drop the following Javascript references into your non-WordPress page:

<script type="text/javascript" src="http://example.com/wp-includes/js/jquery/jquery.js"></script>
<script type="text/javascript" src="http://example.com/wp-content/plugins/wp-greet-box/js/functions.js"></script>
<script type="text/javascript" src="http://example.com/non-wordpress-platform/onload.js"></script>

Notice that we are referencing your modified “onload.js” in here. Be sure to replace example.com with your own site domain.

CSS Placement

There is also a CSS file that you need to reference. Include the following style reference into your non-WordPress page’s header:

<link rel="stylesheet" href="http://example.com/wp-content/plugins/wp-greet-box/css/wp-greet-box.css" type="text/css" />

Be sure to replace example.com with your own site domain.

HTML Placement

This is the easy part.  You will have to place the following HTML code anywhere you want your greeting message to show up:

<div id="greet_block"></div>

That’s all!

That wasn’t so bad was it?

Save and Share
StumbleUpon
Reddit

5 Responses to “How to Make WP Greet Box Work on Non-WordPress Pages”

[go to last comment]
  1. Mack

    Thanks for the tips. Great article

  2. JCMais

    This Post is Updated with the last version?
    I can't find the file "onload.js"

  3. JCMais

    You're Welcome xD

  4. ratesConverter

    Whoops! Lost this post in the forum. It sounds to me like there is some sort of JavaScript conflict. I'm not sure what to suggest here other than try it in a different browser, or try to disable other JavaScripts to see which one is causing this crash.

  5. Bowmanave

    I’ve been using the Greetbox for a while now and it’s been amazing. The options interface is also the best of any other plugin I’ve seen.

[go to first comment]

Leave a Reply