Author: Rizwan Ansari

Revision Count in Posts Admin Screen in WordPress

Author: | Categories: Programming, Wordpress No Comments
This Post discusses how you can add Revision Count in Posts Admin Screen in WordPress. In order to show Revision Count as a Column in Posts Page Admin Screen, add below filter and action in functions.php of your theme. // register custom column add_filter( 'manage_posts_columns', 'custom_posts_table_head' ); function custom_posts_table_head( $columns ) { $columns['revisions'] = 'Revisions'; […]

Add Custom Column in Admin Post List in WordPress

Author: | Categories: Programming, Wordpress No Comments
In this post I’ll show you how to add Custom Columns to WordPress Posts Management screen. Also I will show how to make those Columns Sortable. To add Columns in Posts Page in Admin Screen, add filter “manage_posts_columns” and action “manage_posts_custom_column” in functions.php of your theme. // register custom columns add_filter( 'manage_posts_columns', 'custom_manage_post_column_test' ); function […]

Post Views using Post Meta in WordPress

Author: | Categories: Programming, Wordpress One Comment
This Post discusses how you can track Post Views in WordPress without using Plugin by using Post Meta. Post Views can be shown in Home Page and along with the Post itself but I will show Post Views in Posts page on Admin Screen. In the end, I’ll make this column sortable. Open functions.php of […]

Pass Data to Partial View – ASP.NET MVC

Author: | Categories: Programming No Comments
There are many ways to pass Data to the Partial View. I’ll discuss here method which I use in my projects which is passing Strongly Typed Model to the View. View Models public class ParentViewModel { public Id { get; set; } ..... public ChildViewModel Child { get; set; } } public class ChildViewModel { […]

Bold, Italic and Strikethrough in WhatsApp

Author: | Categories: General No Comments
WhatsApp finally lets you format text. Messages can now be written in bold, italic and strikethrough. To add Bold formatting, just add (asterisk) “*” before and after the text. For example, *Hello!* and WhatsApp will automatically make it bold. See below figure. To add Italics formatting, add (underscore) “_” before and after the text, WhatsApp […]

Navigation Menu using ViewModel ASP.NET MVC

Author: | Categories: Programming 7 Comments
There are many approaches to Generate Dynamic Navigation Menus in ASP.NET MVC Applications, in this post i will discuss one approach using ViewModels and Partial Views which I use in my Applications. First I’ll create a Hard coded Navigation then replace it with based on ViewModel. Lets say we want to create a menu like […]

Login with User Name instead of Email in ASP.NET MVC Identity

Author: | Categories: Programming 2 Comments
When an ASP.NET MVC Application is created with “Individual Accounts” authentication, it is set to use Email address to Register and Sign in instead of User Name, so in this Post I’ll show how to use User Name to Register and Login. Open AccountViewModels.cs in Models folder, add below code in LoginViewModel and RegisterViewModel [Required] […]

Control Raspberry Pi LEDs from Web and Mobile

Author: | Categories: IoT, Linux, Programming, Raspberry Pi 2 Comments
In this post, I’ll demonstrate controlling couple of LEDs connected to Raspberry Pi GPIO from Web. LEDs could be replaced with any devices so its a kind of basic IoT project too, so this core design can be extended to any scale and many devices can be controlled simultaneously. Programming is done in Python and […]

How to Fix Bluetooth Error on Mac

Author: | Categories: Mac No Comments
Few days back my “Magic Mouse” stopped connecting on my MacBook Air. On diagnosis I found that Bluetooth is not showing in System Preferences. Normally it is there as shown in below image. It can also show error like “Bluetooth Not Available” and no device on Bluetooth connect. Here is how to resolve this. Exit […]

Mount (Automount) VHD partition in Ubuntu host

Author: | Categories: Linux, Windows No Comments
Most of the time you need to add hard disk space to you virtual machine without effecting Primary hard disk. Below procedure can be used to add another virtual hard disk to Ubuntu hosted inside Hyper-V. 1. Add new hard disk from VM settings. 2. Start virtual machine and start terminal or connect through terminal […]