Skip to main content
Wordpress
Giancarlo Massaro avatar
Written by Giancarlo Massaro
Updated over a week ago

Please note: Sites and blogs hosted on WordPress.com cannot use ViralSweep because they block JavaScript. This documentation is only for self-hosted WordPress sites.

Notice to WPRocket users: If the ViralSweep code is not showing up on your site, please disable WPRocket minify CSS and minify JS on the page you added our code to.
โ€‹
Skip to: Full Page Install | Widget Install | Lightbox Install

Full Page

In order for the full page to properly function on WordPress, you will need to add the code to a blank HTML file and upload it via FTP. This file will not contain your site template such as your navigation or footer.

1) Create the template file

Navigate to your ViralSweep dashboard:

Click Install on your promotion > Wordpress > Full Page > Copy Code.

Paste the code onto a blank HTML file. Save the file with any name you would like, using the .html extension. For this demo, we've named our file 'index.html'.

2) Connect to your site via FTP

Connect to your site via FTP and navigate to where your WordPress site files are located. Create a new directory where your other WordPress directory files are. Name it based on your promotion, like sweepstakes or contest.

3) Upload the file via FTP

Double click on the new directory you created, and then drop in the HTML file you created containing the ViralSweep code.

4) You're done!

To preview your promotion, you will need to navigate to the URL of where it was uploaded.

Widget

In your ViralSweep dashboard go to:

Install > Wordpress > Widget > Copy Code

Navigate to your WordPress admin panel and choose which page, or which post you want to add the Widget to.

Classic Editor
If you are using the classic editor, simply switch to the text editor and paste in the code and immediately publish the page. DO NOT switch back to Visual Editor or it will break the code.

Gutenberg Editor (blocks)
If you are using the Gutenberg editor, simply add a new HTML block and paste in our code. When previewing you should see our Widget appear.

Lightbox

In your ViralSweep dashboard go to:

Install > Wordpress > Lightbox > Copy Code

Navigate to your WordPress admin panel and choose which page, or which post you want to add the Lightbox to.

Classic Editor
If you are using the classic editor, simply switch to the text editor and paste in the code and immediately publish the page. DO NOT switch back to Visual Editor or it will break the code.

Gutenberg Editor (blocks)
If you are using the Gutenberg editor, simply add a new HTML block and paste in our code. When previewing the page you should see our Lightbox appear.


We're here to help

If you have any further questions, please start a Chat. Just "Click" on the chat icon in the lower right corner to talk with our support team.

Did this answer your question?