I am a web & mobile app developer based in Lahore. I have been developing creative, interactive, usable & successful web apps, web portals, php and Flash action scripting, REST apis, WordPress plugins & themes. In recent years, I have worked on Ionic, Angular and TypeScript for hybrid mobile apps, Flutter & Dart, React & React Native, and Swift native iOS mobile app development.
Featured image in WordPress posts is a great feature and in earlier versions of WordPress, adding thumbnails was a pain but no more.. But getting only posts with thumbnails is still not that straight forward. With WP_Query, you need to use ‘meta_query’ in your query with comparison operator to get to correct results, all other…
For a WordPress/BuddyPress website, if you want to allow your user to upload their photo as avatar after registration on a custom page, during or after the registration process, it is not that straight forward. To make life easier, you can use Simple Local Avatar plugin to upload a custom avatar to your local directory.…
Thanks to ‘mattberg’ who developed the auth controller. I have authored it as a WordPress plugin so that it could easily be searched and installed. mattberg made Auth controller available here https://github.com/mattberg/wp-json-api-auth JSON API Auth plugin extends the JSON API Plugin with a new Controller to allow user authentication. JSON API for WordPress Plugin allows…
We all know that how good WordPress platform really is. Not only standard CMS based websites are now being developed using WordPress, but it is also being used for Mobile app development. Using RESTful API, we can easily extend the WordPress framework to mobile apps. There are many plugins that enable some of the WordPress…
In a WordPress template, if you need to show listing of child pages of a parent page, you can use following code. the first block is the query arguments. Place this code at the top of your template. $args = array( ‘post_type’ => ‘page’, ‘posts_per_page’ => -1, ‘post_parent’ => $post->ID, ‘order’ => ‘ASC’, ‘orderby’ =>…
I upgraded my Redmine installation after a while to 2.3.1 and I noticed email notifications weren’t being sent out. I tried to send a test email from “Administration => Settings => Email notifications” and received the following error message: An error occurred while sending mail (wrong argument (Fixnum)! (Expected kind of OpenSSL::SSL::SSLContext)) After trying different…
Recently while working on a travel portal, I needed to import huge csv data into MySQL database. Apart from the importing data into its tables, there was another problem. how to upload some 650Mb huge data file of sql dump to server for importing. The trick is that download the csv directly on your server…
You can tell passenger to start the application in production environment with following command on shell by going to the app folder first. I wanted to use Passenger for Redmine app. Start Passenger Log into shell and go to app directory and type the following command: root@server [/home/redmine]# passenger start -a 0.0.0.0 -p 3000 -d…
If you have annoying scrollbars on your Facebook iFrame App page, here’s how to remove them. First of all, make sure that you have setup your app canvas height correctly here https://developers.facebook.com/apps. You can select fixed or fluid width though. see following screenshot. Now add following code after the body tag in your page. Don;t…
Following is the simple solution to make a div’s background color change on mouse over and then change back to the original color on mouse out. I have made available all the php, css and js code for you to first create the listing and then changing the div background color on mouse hover. Before…
Facebook Graph API allows you to do amazing things with lot much code and hassle. For a Facebook app I was developing recently, I needed the list of mutual friends of two app users, to rank those higher who had higher mutual friends count, I wrote following function and worked like a charm. Just create…
Recently, I installed ShareThis plugin on a WordPress website (with counters) and I needed to show the count of total likes and shares for that domain but those counters just count for each page separately. If you want to show the site-wide count of the FB Likes, Google Plus and Tweets in your WordPress Blog,…
“ShareThis” is a great WordPress plugin for adding social links to your Posts and pages. ShareThis plugin seamlessly enables users to share your content through Email,Facebook,Twitter, Google +1, Like, Send and many more. This plugin works well but adds the social shortcuts to every page, post, excerpt and custom post type that you have in…
While developing a Facebook Dating app recently, I needed to return records for a date range between minimum and maximum age from users table but the data was in the date format (birthday). Following select command will calculate the age from the `birthday` column value for you for each record: SELECT EXTRACT(YEAR FROM (FROM_DAYS(DATEDIFF(NOW(),`birthday`))))+0 AS…
Mingle Forum is very useful WordPress Plugin that allows you to quickly put a Forum on your WordPress site/blog. Email notifications in Mingle Forums is one area which needs improvement. Earlier for a previous version, I had posted a hack so that every member could get email notifications for any new topic started by any…