X

Entice StumbleUpon Visitors with Custom Message

Snippets by IsItWP

StumbleUpon is a famous social media site that can be used to drive traffic towards your website. You can display a custom message to the visitors coming from the StumbleUpon site.

Instructions: Add the following code to the header.php file of your WordPress theme.
Replace the text in third line with your welcome message.

<?php if( strpos($_SERVER[HTTP_REFERER], "stumbleupon.com" ) == true ): ?>
    <div class="welcome-stumbleupon">
        <p>Hello StumbleUpon user!</p>
    </div>
<?php endif; ?>

You may also enjoy using category parent template.

Comments   Leave a Reply

  1. Sweet!

    1. Great snippet Filip, forgot to link your name to the wp site, updated the post.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!