How to Add WordPress Custom Metabox with Multiple Fields

To add WordPress custom meta box with multiple fields, first I will create a meta box with multiple fields. So in this case, I will add text, select, textarea, radio and checkbox input fields in my custom WordPress meta box, and then will save the value of these fields in the database and show you […]

How to Use WYSIWYG or WP Editor in WordPress Custom Meta box

Want to learn about how to add and use WYSIWYG or WP editor with your custom WordPress metabox, then trust me, it’s super easy. To add wp editor or wysiwyg editor, WordPress provides a function wp_editor() with some parameters and their attributes. wp_editor($content, $editor_id, $settings); $content – this is a string and required parameter, this […]

How to Enqueue Script & Style in WordPress Admin & Login

Are you working with custom theme or plugin?, then there can be a chance where you need to enqueue scripts and styles in WordPress admin pages or any specific admin page or may be login page. To enqueue scripts and styles in WordPress admin pages and login pages, code snippets are given below. You can […]

How to Create Audio & Video Shortcode in WordPress

Adding an audio file or video file in WordPress is pretty easy, you can do that simply by adding media from the WordPress editor but here I will show you how to create audio and video shortcodes in WordPress. To create an audio shortcode and video shortcode, code snippets given below. Just add them within […]

How to Create Menu Shortcode Without Plugin in WordPress

Bhuvi: Hey… I am looking for something to display menus that I choose on the WordPress page or post on the fly…is it possible?. DIWP: Yup Man…of Course. You can do that by just creating a simple shortcode for the menu and then just add that shortcode in the page or post where you want […]

How to Create Image & Button Shortcode in WordPress

Looking for code snippets to create shortcodes for image and button in WordPress?. Here are the code snippets, Just add these snippets in your theme’s functions.php file and you are good to go. Create Image Shortcode To create image shortcode, all you need to do is just add this code into the functions.php file. Then […]

How to Enqueue Script and Style Only If Page Using Shortcode

Do you want to enqueue script and stylesheet only if the page uses a particular shortcode?. Here are the 3 methods with different scenarios to do that easily. Let’s understand them one by one. For all these 3 methods, Let’s assume 3 different cases. One for each method to get the idea of enqueuing only […]

How to Enqueue Scripts & Styles Only When Shortcode Exists

If you are working on a custom WordPress theme or integrating any plugin with your custom theme then there can be a chance where you just want to include javascript or CSS files only if a particular shortcode exists in your WordPress website. To check shortcode existence WordPress gives a function shortcode_exists($shortcode_tag). By using this […]

How to Enqueue or Include Scripts, JS, Jquery in WordPress

If you have just started with WordPress development, then enqueuing Scripts, Javascript, Jquery files and enqueuing CSS, Font-Awesome Icons, and Google Fonts in WordPress are one of the most important parts of WordPress development, that you must know. However, you can directly include any js file in WordPress by linking them in the header but […]

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top