Ajit N

WP Add custom column to Users List admin panel

Use below code to allow your users to add phone numbers. Paste this full code in functions.php file. This will add new field on user profile for “Phone Number” and add a column user table on WordPress admin for phone. [crayon-5905223c22b82496486098/]  Read more …
Ajit N

Counts all the values of an array

array_count_values() returns an array using the values of array as keys and their frequency in array as values. [crayon-5905223c231e3598117749/] For counting the values with case-insensitive matching [crayon-5905223c231e7287993904/] This prints: [crayon-5905223c231ea999729540/]  Read more …
Ajit N

Display or retrieve the HTML dropdown list of categories.

The ‘hierarchical’ argument, which is disabled by default, will override the depth argument, unless it is true. When the argument is false, it will display all of the categories. When it is enabled it will use the value in the ‘depth’ argument. [crayon-5905223c23433573919684-i/] For get html list of category by...Read more …
Ajit N

GROUP_CONCAT() function

MySQL GROUP_CONCAT() function returns a string with concatenated non-NULL value from a group. Returns NULL when there are no non-NULL values. Syntax : [crayon-5905223c2367e016023552/] Output Example : [crayon-5905223c23682013583911/]  Read more …