Posts

Showing posts from July, 2014

Redirect Mobile Users To Mobile Website

Image
If you have a separate mobile website for your mobile/handheld users you can use this simple JavaScript or .htaccess  method to redirect users based on their screen width to your mobile website. However it is recommended to use Responsive design instead of a separate mobile URL like m.example.com. But, if you still prefer a separate mobile website and have enough reasons for it lets redirect mobile users to mobile website. Redirect users: The Java Script You can use the code above which detects if the users screen is less then 900px he/she will be redirected to the mobile website. Include the snippet above in your head tag. on some smart phone or tablets width may depend on how the user is holding a phone(portrait or landscape), so it will be better to check some major smart phones width. <script>// <![CDATA[ if (screen.width <= 900) { document.location = "http://m.example.com"; } // ]]></script> You can change m.example.com to yo

How to Host Ghost Blog for Free

Image
Want to host your Ghost blog free? here are some quick suggestions about free ghost hosting providers. Ghost is a clean Blogging platform and if you want to host your own ghost blog for free, here are top free ghost hosting providers. Hosting and running a free Ghost blog is quiet easy. Here  we are going to review ghostify.io , ghoster.io freeghostblog.com and some others. Host your Free Ghost - Ghoster.io Ghoster.io is the perfect free cloud service for your ghost blog. they can host your one Ghost blog for free, even with your own custom domain. Ghoster.io Features Your own domain name ; you can set up your own custom domain name. Pre-bundled themes: A set of free themes pre-bundled. Daily backups of your ghost blog. Automated upgrades Ghoster.io limits Minimum one post a week. Max 1K views per month. No custom themes. Promote ghoster with a link at footer and below every post. Ghostify.io - managed Ghost hosting ghostify.io  also provides ghost hosting . They offer

Display the Total Comments Count in WordPress

Image
If you have a good number of comments on your WordPress blog, and want to show your users the same, you can do this by simply following the tutorial above. If you have huge number of comments on your blog you can display total number of comments on your WordPress blog's footer or sidebar. This can encourage users to read other posts also and may increase your pageviews. Displaying Total Number of Comments in WordPress Sidebar It's very simple just open your sidebar.php file, and paste the following code where you want to show off comments count: <?php $comment_count = wp_count_comments(); echo $comment_count->approved . " Comments, Your custom message here"; ?> you can change "your custom message here" to anything you want to add or delete it. If you want to add it in footer just instead of editing  sidebar.php edit the footer .php file. Feel  free to ask for any help regarding this tutorial in comments.

Show Full Post on Front Page of Ghost, Not Excerpt

Image
I love writing about the Ghost platform. Its simple and just focused on blogging and that's why I love this platform. Some bloggers like to show full posts on homepage instead of post excerpts . By default Ghost(with default theme) displays excerpts on homepage. However if you would like to show full posts and not excerpts on the front page on your blog there is an easy way to change from excerpts to full posts on Ghost Homepage. Show full posts on Ghost Homepage : Tutorial Its very easy if you have access to your ghost blog by ftp/sftp or have Ghost hosted on your computer. you just have to be able to edit the index.hbs file. First open the index.hbs file. Find the above code: < section class="post-excerpt" > < p>{{ excerpt }}… » < /section > Replace it with: < section class="post-content" > {{ content }} < /section > You are done now, just save and restart Ghost. Warning: If you are displaying too much pos

Adding Favicon To Your Ghost Blog

Image
Ghost is a new blogging platform  for bloggers. If you are one of those bloggers who are using ghost for publishing their blog and you want to add a favicon image to your blog then this tutorial is for you. A Favicon file is normally a 32X32 square image that is displayed before your page title in open windows and tabs and also used by some other tools. Adding your own favicon image to ghost blog is quite easy. Follow above steps and make your blog more adorable. Editing the default template : Casper For adding the template we will have to edit the template files (you can use a ftp server for that, or sftp). Open default.hbs file, you can locate it at content/themes/casper/default.hbs Upload your favicon.ico file to content/themes/casper/assets/images/ (you can also use favicon.png or any other name for your image file but favicon.ico is recommended.) There you will find code something like this {{! Page Meta }} <title>{{meta_title}}</title> <meta name=

Disable Text Selection Highlighting Using CSS

Image
There is a code snippet in CSS3 to disable text selection by user. Code below is cross-browser and might work well on all of the latest browsers like Chrome, Firefox, Safari and IE10+. 1. Disable Text Selection Highlighting Of Whole Page *{ -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } 2. Disable Text Selection Highlighting Of Specific Element (e.g.: A Div)  .unselect { -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } <div class="unselectable"> ...</div> More Information can be found at below link : https://developer.mozilla.org/en-US/docs/Web/CSS/user-select?redirectlocale=en-US&redirectslug=CSS/user-select