Remove p tags from shortcode WordPress

If you are a WordPress developer, you should have face this issue. In shortcodes, you sometimes may see the p tag and for this reason you code does not work as you want. I will show you how to fix this and it’s super easy. Just copy the following code snippets...

First post image auto set as featured image

Sometimes we need to grab the first post image as our WordPress Features Post Image. The following code snippet will save your first post image as your Features Post image. function apbd_auto_featured_image() { global $post; if (!has_post_thumbnail($post->ID)) {...

Create Custom WordPress User Roles

Sometimes we need to add custom user roles in our WordPress CMS. The following code snippets will add a custom user role inside your CMS. For more roles, please see the capabilities from Codex or WordPress documentary. This is just an example to start it right away....