Using Custom Code on Free Web Publishing Resources
Written by
Daniel Katz on
April 27, 2015When it comes to building a website, everyone has different priorities. People who like to be in control can choose to code the entire website from scratch. Then there are those with a specific vision who hire a web developer to help them complete it. Some opt for a well-supported, easy-to-install CMS and rely on templates. And some use free website building tools.
The popularity of website building tools has risen dramatically in the past few years owing to their simplified approach to website development. They are based on the WYSIWYG ("What You See Is What You Get") principle, which means that the users can build an entire website simply by dragging-and-dropping and inserting elements like text boxes, menus and images. These elements can be customized and rearranged on the page, or the user can just pick one of many pre-made layouts.The idea behind these services is to help users who are not particularly tech-savvy to design and publish their own websites. The focus is on making it as quick and simple as possible, while preferably keeping the expenses low.The majority of the leading website building tools market themselves as free, although they usually offer additional premium plans and upgrades with more features, like custom domains, support for SEO and social media integration, and e-commerce tools.Most web designers and developers have an established workflow, so they probably wouldn't choose an online website builder when starting a new project. However, it's possible that a client already has an account on one of these services and wants you to maintain their website. In such a situation you might ask yourself: "How much control over the code do I have?"
Since the main premise of website builders like
IM Creator or
Wix is that you don't need any coding knowledge to build a website, seeing the generated code or incorporating custom code will often be next to impossible.However, some web publishing resources offer full or partial code customization, which can help web developers and their clients who need a simple, no-frills home for their content, but still want the flexibility of using their own code. Here are five short and sweet tips on how to use custom code with website building tools.
Choose a service provider that allows custom code inclusion
Smart planning is half the work done, so before you start building a website, explore the options and find out exactly what each website building service offers. More specifically, look for service providers that support custom code, whether they are just a visual website building tool or a complete web hosting solution.
Hostt, for example, provides free hosting to users who acquire a domain from the company. But instead of limiting users to a pre-set CMS and template, the service enables flexibility, such as access to FTP, PHP, Apache and cPanel, including customizing .htaccess.If you're in a position to choose -- that is, if your client is not locked-in with a specific service -- do yourself a favour and pick one that has a website export feature. That way, you can easily create backups and migrate the entire website if it becomes necessary.
Work within the parameters of the provider
Sometimes the client will already have made the choice, and it's your task to get acquainted with the service. First, establish whether the free version supports custom code at all, and if not, purchase an upgrade. Some services have a special "developer's mode" that lets you directly modify the website code and even create templates. Similar to this is a feature called "Code View", which is essentially a separate editing mode in which you can customize code instead of dragging-and-dropping elements in the WYSIWYG editor.In most cases, custom code support is limited to HTML,
CSS and JavaScript, with CSS occasionally constrained to a number of characters or lines. The code is implemented by pasting the snippets into the customization dialog, into a code-embed widget, or by inserting a special element called “code block” into the page itself. This code block usually looks the same as a regular text box, but it only recognizes HTML or CSS code as valid input. When a service supports JavaScript custom code, it will often have designated areas or modules in website header and footer where you can embed the code. This is useful when you want to incorporate
Google Analytics into the website.
Sanitize your code for potential conflicts
Almost every service has a disclaimer that they don't provide assistance with problems caused by using custom code. If custom code stops working or if it needs to be updated, you will have to perform troubleshooting and maintenance manually. Likewise, if you plan on using third-party code snippets, check what they do before pasting them to avoid unresponsive scripts and security issues. Some website building tools don't allow any advanced input beyond custom CSS, and they discourage modifications that affect the layout of the website. It's recommended to stick to cosmetic details like colors and fonts to avoid breaking the page structure.
Use the platform tools when you can
In some cases, the functionality of custom code can be replaced by the default platform features. Every website building tool has plugins, extensions or modules that let you connect social media accounts, implement a comments section and embed various widgets. For example, you can insert an element or activate a plugin for forms instead of pasting custom form designs. Native elements will be upgraded along with the service, so you don't have to worry about their stability and security, as is the case with custom code.
If all else fails, "graduate" to paid services that allow more customization
Despite being practical and affordable, website building tools aren't always adequate for your client's needs. After all, there is only so much you can do with custom code snippets, and such services are not aimed at advanced users and self-reliant developers. When it becomes clear that a website building tool won't be able to accommodate a particular modification or feature, it's best to initiate an upgrade to a more customizable service. If the budget is tight, consider WordPress, which is free and comes with countless
amazing themes. Many popular CMS solutions, like Drupal and Joomla, are not only free, but also open-source, which means you can develop your own themes and extensions for a more in-depth customization.