If you’re trying to use the Tumblr API, develop the website and also hide it from the general public… you will probably be having a few problems… just like we were!
If you are having issues, below are a few handy steps to help solve the problem:
First, create a div that will block any user from seeing the content on your site. I’ve added the script in-line to make sure there are no issues with loading external stylesheets – remember to change the background image!
<div style="background: url(image) no-repeat center center white; position: fixed; z-index: 1000; top: 0; left: 0; right: 0; bottom: 0;"></div>
Next you’ll need a little script to remove the div if it’s a correct password. If they enter a wrong password, we’ve got it set up to empty all of the contents of the site and redirect them – this makes sure they wouldn’t be able to see anything on your site!
var msg = window.prompt("Enter Your Password", "Password");
jQuery( document ).ready(function() {
if(msg != "password"){
jQuery("body").remove();
window.location.replace("https://www.bigeyedeers.co.uk/");
}else{
jQuery(".pswdtest").remove();
}
});
Change “password” to whatever you would like the password to be and also replace the website to whatever you’d like!
Finally, upload this script to Tumblr and hook it up to your theme. You’ll now be able to use your website to generate an API key to use more features of Tumblr whilst still having a locked website!
If you do have any questions for us about your current site or an upcoming project, feel free to get in touch and we would be more than happy to help out! Head to our contact page for the details to get in touch with the team in either our Cardiff or Cornwall offices!
Formerly known as Magento, Adobe Commerce is built for complex catalogues, integrations, and long term growth. We design and develop stable, scalable stores that support demanding eCommerce requirements, including multi-store setups, complex pricing, and Hyva based performance improvements.
We design and build custom eCommerce platforms for businesses with complex workflows, integrations, or non standard requirements. Built from scratch around your business needs using Laravel and modern architectures.
Working with brands across the UK from our offices in Cardiff and Exeter, you deal directly with a senior team of designers and developers specialising in Shopify, Magento, WordPress and bespoke eCommerce platforms.
We focus on commercial outcomes. Better conversion rates, strong SEO foundations and eCommerce platforms that continue to improve long after launch.