Stop Page From Opening In A Frame
ShareIf you want to make sure your website is not opened in a frame from some other website, put this JavaScript in the Head of your page:
<script type="text/javascript">
if (top.location != self.location) { top.location.href = self.location.href; }
</script>
Hide Email Addresses from Spammers
ShareWant to have an email address on your webpage but don’t want the bots to harvest it for their spam lists? Try this technique.
Put this JavaScript in the Head of your page:
<script type="text/javascript">
function contact(domain,user) {
window.location.href = "mailto:" + user + "@" + domain;
}
</script>
Then use this as your email link:
<a href="javascript:contact('example.com','name');">Contact Us</a>
If you only use one domain name for all your email addresses on the page, then you can [...]
Handy HTML One Liners
ShareYou can easily create a scrollable text box with this one line tag. You can put anything inside the scrollable area. This is a very simple one line alternative to the iframe.
<div style="padding: 20px; overflow: auto; border: solid 1px black; width: 400px; height: 300px;">
Content goes here
<div >
Disable autocomplete on any input field with the autocomplete parameter in your input tag:
<input . . . autocomplete="off">
You can do a simple redirect to [...]
To Display Code in A WordPress Post
ShareThis is an example of code in a WordPress post or page:
<?php /* Template Name: three colums */ ?>
Without proper conversion, you get an empty space like this:
Proper Conversion
Here’s what I did for this tutorial:
I converted the above code using the Unicode Code Converter by Ishida.
Copy the converted text in the “Hexadecimal NCRs” box. See below.
Pasted into this post and within the [...]
To Create A WordPress Page Template
ShareDuplicate either the “home.php” file or the “index.php” file in your template folder, then add this code at beginning of it. Rename the modified file.
<?php /* Template Name: Membership */ ?>
Tips on Picking Domain Names
ShareBefore you register www.thefirstideathatcameintoyourmind.com, I’m going to let you in a little secret of how search engines work. One of the ways search engine work is they look at domain names for searched keywords, and present sites as result.
For example: when you do a search for “business print automation“, Google shows “www.businessprintautomation.com” as number [...]
Why Free Websites Are Bad for Everybody
ShareIf you’re serious about having a website, you should pay for it. Personally, I never like free websites:
Too many ads — These companies have to make money somehow, so they run ads: top ads, bottom ads, ads on the side columns, pop-up ads, multi pop-up ads, pup-under ads, pre-loading ads and many other ways these company can [...]
Moving A WordPress Site
ShareThere are times when you need to move WordPress around within your server, and times when you need to move WordPress from one server to another. You don’t need to reinstall. WordPress is flexible enough to handle all of these situations.
Easy answer for most installations:
If database and URL remains the same, you can move by [...]
