WordPress hook is a popular way to overwrite default function in WordPress. Perhaps you want to prevent non logged-in user to access your singular custom post which by default will be displayed using single.php file template. This is explained in WordPress template hierarchy. template_include hook can be used as one of the options available.

Here sample code to be included in your theme functions.php file. In this example, when non-logged in user trying to access the ‘mycustompost’ single post type, it will be displayed the 404 template.

HostGator Introduction

HostGator offer a broad range of services, but they’re undoubtedly best known for their well-priced shared hosting plans. They offer three shared hosting services – Hatchling, Baby and Business – and each one steps up the service options and support provision. In addition, HostGator offer reseller plans, VPS hosting and dedicated servers, as well as an affiliate programme.

HostGator is a private company. The current CEO Brent Oxley formed the company while he was at university in 2002. Now, HostGator host more than 8 million domains for 400,000 customers in over 200 countries. Originally based in Florida, HostGator’s rapid growth lead them to a move to Texas in 2007. They have a base in Houston and an office in Austin, plus an Indian arm which you can find at http://hostgator.in. Additionally, HostGator have a third office in Brazil which manages http://www.hostgator.com.br. They currently employ 200 people but are expecting to double this in the next couple of years.

HostGator Hosting Plans

Across the board, all of HostGator’s servers on shared, reseller and VPS plans run Linux (CentOS is specified on the Linux plans). When it comes to dedicated servers, users can choose Linux or Windows; the Windows servers run Windows Server 2008 R2 at the time of writing this review.

Shared hosting covers three plans. The most basic plan, Hatchling, is a one-domain package with no add-on domains and no anonymous FTP, but it’d be fine for hosting a blog. For more domains, users need to upgrade to Baby or Business. For anonymous FTP, only the Business package will do. Additionally, dedicated IPs are not available on the Hatchling plan. On Baby, they’re chargeable, and on Business, they’re free. Business also includes private SSL (the others are shared) and a toll-free number for you to use as you please. This is only really useful for US customers, or those marketing primarily to customers in the US, although the number can be extended to serve Canada at additional cost.

Shared hosting is HostGator’s speciality, but they do also offer a few other options.

Reseller hosting is split into five plans depending on the disk space, bandwidth and domains that are required. Other than that, the provision on each plan is more or less the same.

Dedicated servers are priced according to the resources you need. The pricing is the same for both Windows hosting and Linux hosting, but the software obviously differs depending on the OS.

If you want to run Java, you’ll need a VPS or dedicated plan, but Python is installed on all servers.

HostGator don’t currently offer cloud hosting.

HostGator Uptime/Downtime

HostGator rent their data centre space from The Planet, using four of their facilities in Texas. Power back-ups, fire detection and constant monitoring from on-site staff keep their 12,000 servers safe and secure. They use 10 different fibre providers, including hardware from Time Warner and AT&T. They currently offer a 99.9% uptime guarantee (although they don’t publish any stats) and offer an RSS feed for service status updates.

All accounts (except dedicated servers) are backed up on a weekly basis. If you need to restore a backup, HostGator charge $15, unless you supply the backup file yourself, in which case it’s free.

HostGator host more than 8 million domains, and they’re pretty open about their staff, resources and services. They have a host of high-profile partners too: Cisco, AT&T, Dell are just a few of the recognisable names on the list. Notably, they don’t allow overselling, so the capacity you’re given is the capacity you’ll actually get. The exception is on a VPS or dedicated server where you’re free to oversell at your own risk.

HostGator Support

HostGator’s support options are pretty comprehensive for a low-cost shared hosting provider. You can access 24/7 live chat support, a FAQ, email support or phone support (within the US, it’s free to call their phone number). It’s not clear where their support staff are based.

Support and billing is provided via a portal where customers can login to upgrade their account, access user forums, check out the knowledge base and watch helpful video tutorials on some of the most common configuration questions they’ll face. This account login is separate from the Cpanel login. In addition, transfer requests are handled smoothly via a quick online form.

HostGator in the News

In June 2012, a hacking group hit HostGator with a DDOS attack which was named #TheHolocaust. UGNazi later used similar tactics to take down other hosts and payment processing companies. HostGator brought their servers back online within four hours

HostGator Control Panel

All of HostGator’s Linux plans come with Cpanel 11 as standard, and users are given a variety of themes to choose from. Cpanel provides access to all the features you’ll need, including webmail, one-click backups and DNS settings for Google Apps.

Reseller accounts are also provisioned with Cpanel and WHM. Both Cpanel and WHM are optional on VPS and HostGator’s Linux dedicated server hosting plans. On a Windows dedicated server, Plesk 11.x is included in the price.

On VPS plans, HostGator also provide Virtuozzo, an administration package for the server itself.

All customers get access to a separate billing area to organise payments and download invoices.

HostGator Extras

The Business shared plan on HostGator includes a free toll-free number for US callers. Optionally, this can be extended to Canadian customers for an additional charge per call. Should you cancel your hosting plan, you lose the number, unless you contact HostGator first to take it to a paid service. You’ll also need to receive at least one call per month to keep the line active.

HostGator also offer $100 Adwords credit on all shared hosting plans, and reseller accounts receive a free upgrade to an eNom domain reseller account. This requires manual set-up, but it’s a quick and painless process that takes a couple of minutes.

HostGator Money Back Guarantee / Cancellation Policy

You can cancel your shared, reseller or VPS hosting plan within the 45-days and receive a full refund. Dedicated servers are not eligible. Costs incurred, such as admin and installation fees or domain name purchases, are non-refundable.

Cancellation requests need to be sent via a special online form. The account will be cancelled within 48 hours. If you want to claim a refund, you need to reply to the cancellation email and request it – it’s not automatic. Refunds are sent via credit card or PayPal.

Discounts & Coupon Codes

If you want to get cheaper price with Hostgator hosting, here are list of big discount (up to 75% off) time every year:

Black Friday ( Friday following Thanksgiving)

Cyber Monday (Monday after the Thanksgiving)

Year End / New Year Sale (1 week before/after Christmas)

Other method to get more discounted price is by using coupon code. Use following coupon code to get $9.94 off with your purchase. This method is good if you want to test Hostgator performance for one month subscription.

994OFFERGATOR

The highest possible discount for normal time is 25% off by using this coupon code:

25OFFERGATOR

By default, SNAPPY coupon code for 20% discount is applied automatically when you fill order form.

HostGator Summary

HostGator proudly claim to be eco-friendly. They offset their emissions, and they also use 130% wind power via Renewable Energy Credits (RECs). Considering the company claim that more than 1% of the planet’s internet traffic flows to and from HostGator’s 12,000 servers, that’s definitely a big achievement. While HostGator’s low pricing is similar to other shared hosting providers, their plans are extremely comprehensive and scalable, making it easy to purchase a small shared plan and upgrade to a higher-spec shared hosting, VPS or dedicated server package over time if you need to.

HostGator also place great emphasis on user help, and it’s rare to find such a large hosting company that readily offer efficient live chat, email and phone support for free. The added extras, such as the eNom account and affiliate programme, make them an ideal choice for a new business that’s looking to grow or white-label. All in all, they offer a rounded feature set for a good price with a whole host of extra features to keep loyal customers happy.

Lightbox is a JavaScript application use to display objects like images, iframe, video, pdf, inline content, ajax, etc using modal dialogs. These object are more presentable when displayed using lightbox script because the user can focus on that object which overlaid on the page and made other content hidden under the shadow. There are lot of choices for lightbox script, among them are:

Most of above script developed under jQuery framework for simplifying the script in order to reduce total file size.

Web form also look nicer when integrated with lightbox. One of easy ways to integrate the form with lightbox is by using the plugin which we will go through step by step in this tutorial.

Get the script

First of all, we need the lightbox script to be included inside our plugin. Let choose one of them (Fancybox) which can be downloaded here. Extract the zipped folder and select required folder to be used as below:

/fancybox/ and all it’s content

Put all above files/folder inside a new folder, name it form-lightbox.

Create Header and Print Javascript and Stylesheet Code

Every main plugin .php file need a standard header, so create a file using text editor and put this content.

Look, I have divided into two shortcode which is caller and object. The caller shortcode can be called multiple time but the object must be called once only. The caller also can be wrapped in a sentence not like before. You also can change the title and text for each caller but do not change the class attribute.

Note: If you editing post/page which already have the

shortcode, please check the id attributed because it may be the same with existing. Please change it manually or your new lightbox object doesn’t work.

The best WordPress designs can be broken down to three words “Quality WordPress Theme.” It is all about the theme and a good theme can make your site look great and function perfectly and a bad theme can not only look good but cause errors on your site.