Category: WordPress

How to Show Admin Notice on Plugin Activation?

1. Add the code in the Notice Class like Below –

Read More “How to Show Admin Notice on Plugin Activation?”

WPCS with Visual Studio Code


The easiest way to get started with PHP_CodeSniffer is to download the Phar files for each of the commands:

# Or download using wget

# Then test the downloaded PHARs
php phpcs.phar -h
php phpcbf.phar -h

Composer Read More “WPCS with Visual Studio Code”

After Installation of Visual Studio Code

Go to Preferences  → Settings and then paste code within {} brackets –





Change Custom Post Type Name Safely.

Just replace the second line’s post type names:



Conditional Script Loading for Shotcode

In the functions.php file or in your plugin file write the code below –

How to Set a default Title for the custom post?

Now use the function

Gray Scale with CSS with Cross Bowser Support


How to a Add Custom Meta Box for Multiple Post Type

See: Stackexchange , Codex

How to get Category Slug by Category ID in WordPress?

I have got the category id list with the variable $my_cats_id.

So now I have used my own trick to get the slug –