Mohsin Rasool - IAM & IGA Consultant

  • Home
  • About
  • Testimonials
  • Genesis Framework for WordPress – What, Why & How
  • Contact

Powered by Genesis

Associate Tags & Categories with Custom Post Type – CPT & Make them Work on Archive Pages

October 2, 2014 by Mohsin Rasool

If you associate your own custom post types with the built-in ‘category’ and ‘tags’ taxonomies in WordPress, to make them work in Tag, Category Archive pages, you need to add following code in the functions.php

add_filter('pre_get_posts', 'query_post_type');
function query_post_type($query) {
if(is_category() || is_tag()) {
$post_type = get_query_var('post_type');
if($post_type)
$post_type = $post_type;
else
//in following line replace 'cpt' with your own cpt.
// note 'nav_menu_item' is added in below code for custom menus to work on archive pages with it.
$post_type = array('nav_menu_item','post','cpt');
$query->set('post_type',$post_type);
return $query;
}
}

Filed Under: Code, WordPress Tagged With: CPT, Tags, Taxonomies

An offline version of Khan Academy

August 14, 2014 by Mohsin Rasool

Wow this seems to be really great for the students in developing countries without broadband or high speed internet connections.

KA – Lite – An Offline Server for Khan Academy!

Thanks to the post at: ThimphuTech Blog (

The $99 Khan Academy wireless server, using a Raspberry Pi

)

 

Filed Under: Code, Technology Tagged With: Education, Open Source

Keep Height of Second Div column same as First Div

September 18, 2013 by Mohsin Rasool

Hi,

In responsive web design, I often encounter this issue, and solve it with jQuery. However this time, it was little different took much time to get it right.. So i am posting here for future reference:

<code>

<script>
jQuery(document).ready(function($){
var currentHeight = 0;

$(window).load(function() {
currentHeight = $('#slider').outerHeight();
$('#slider-right').css({'height':currentHeight});
});

$(window).resize(function() {
currentHeight = $('#slider').outerHeight();
$('#slider-right').css({'height':currentHeight});
$(window).trigger('resize');
});

});
</script>
</code>

I had two column layout, with responsive slider at the left, and a div in the right.

As slider keeps changing its height, right div looked bad. So using above code, we can use Jquery which does:

1. Take size of slider (on load as real property in css is not set, and you need to let the page rendered to get the rendered height)

2. Now we have two functions, one changes the height of right div on first page load. And second does the same thing but on every time when window resizes… to keep the height same on every window resize/reload.

Filed Under: Code, jQuery, Technology, WordPress

Best Free Open Source FTP Client is FileZilla

January 14, 2007 by Mohsin Rasool

Update: Dec 1, 2007 As FTP commander guys has stopped offering free version. My recommendation goes to OPEN SOURCE free and Best FTP client Filezilla  

I am using Filezilla now and it is awesome when it comes to FTP tasks. So download it and use it as it is BEST free FTP software which is also OPEN SOURCE and constantly being updated by the great programmers!

Update: Oct 27, 2014

FileZilla tips you need to master:

  • Bookmarks
  • Synchronized browsing
  • File Filters , MENU View -> File Filters (to hide all configuration directories in local machine, very hand time saving filter with the same name!)

 

————–

Yes this is fact what i have written in the subject line.

SmartFtp was suggested by a friend of mine as a good ftp client online. I tried it a lot. it worked fine for me in many situations but failed at many other tasks. It was impossible for me to upload a big script to my server using this crap client. It never completed the upload. So i started to research for other ftp client which can upload big files, many files at a time at maximum speed.

Till now, i have tried many other ftp clients, but for now FTP Commander is working best. [Note: as per above update i recommend Filezilla!] Yeah it is FREEWARE, it is speedy uploader, and it is able to upload big folder with so many files without any problem. Thats it. Maybe it help you in difficult situation!

wishes

Mohsin

Update: Dec 1, 2007 As FTP commander guys has stopped offering free version. My recommendation goes to OPEN SOURCE free and Best FTP client Filezilla  

I am using Filezilla now and it is awesome when it comes to FTP tasks. So download it and use it as it is BEST free FTP software which is also OPEN SOURCE and constantly being updated by the great programmers!

Filed Under: Code, Internet Business, Technology Tagged With: Business Tools, FileZilla, Free, FTP, Money Matters

Recent Posts

  • Launch Again if Needed
  • Testing Gutenberg Editor
  • My Favorite Quotes
  • Fix NodeJs Permissions Problem
  • Take Full Page Screenshot in FireFox with No Addons like a Boss
  • My Calculator is Now NodeJs instead of Google or Excel
  • Node.js Installing on Ubuntu 14.04 and also NPM
  • Associate Tags & Categories with Custom Post Type – CPT & Make them Work on Archive Pages
  • SASS & SCSS to Super Charge CSS Skills
  • Bluefish Editor – Text Editor for Programmers
  • An offline version of Khan Academy
  • Happy New Year 2014 & Falling Snow until 4th jan
  • WordPress 3.8 I love Admin Interface
  • German City Starts Distributing Free Ubuntu 12.04 CDs to Windows XP Users
  • FireFox Responsive Web Design View RWD
  • Keep Height of Second Div column same as First Div
  • Using PTCL & WordPress – Two Unusual Issues I Faced Today
  • Surprise – The Biggest Bonus So Far & Joy of Working
  • Toastmasters Club Lahore
  • Giving Access to Specific Bucket in AWS using IAM
  • GiT Guide & Basic Commands for Git Beginners
  • Added Good Looking Pricing Table to MagicBox Website
  • Thank You WordPress
  • Yes You Can Do It _Watch it Now
  • 2Checkout Coupon Promo Code Get Free 2Co Account
  • Top Ubuntu Free Softwares We Use Everyday in Our Internet Business
  • Market Samurai – Great Customer Support
  • Bobby McFerrin hacks your brain with music
  • Start up File Helps Your Startup Business
  • Simply Awesome – Reunion With Old Friend
  • Fire the Complex, Go for Simple
  • Facebook Profile Nice & Clean Personal URL
  • Forget about todo list, Manage Your Energy
  • Credit Card Interest Rate Puzzle & Banker’s Bomb
  • Seven Best Free Tools I Use Everyday in my Business
  • Google Wave – Best Tips & Tricks for Users
  • Paypal in Pakistan? Response to a Friend
  • Google Apps – Future Of Business Communication
  • Flippa for Flipping, Good as Sitepoint?
  • Fit Reports Launched again at Fit dot com
  • How a Website is Created Online Exactly – Part -1
  • 2Checkout Owner Alan Homewood Interviewed
  • Uploading Files Fast Quick Tip
  • How to Delete All Those Spam Comments
  • WordPress as CMS Pages RSS Feeds
  • MySQL-Front What a Great Tool
  • Google Chrome Browser Background Problem
  • Quick Fix for WordPress Duplicate Content
  • WordPress Blog Tips
  • No Paypal, No Clickbank, No Problem