WordPress
December 3, 2020

How to Create Custom Post Type in WordPress

Custom post types are same like posts and pages. By default WordPress comes with a few different post types which are all stored in the database under the wp_posts table.

Default Post Types

  • Posts
  • Pages
  • Attachments
  • Revisions
  • Navigation Menus
  • Custom CSS
  • Changesets

We can create your own custom post types and call them whatever we want. On below example we register a post type ‘events’ with an array of arguments. These arguments are the options of our custom post type. Code goes in function.php file of your active child theme (or active theme).

Resource


Related Post


Mobile Menu Collapse Effect Divi

Right Now Divi is not providing collapse effect for mobile menu. So when we have many items its hard to manage menu on mobile. It’s a great way to customize the Divi mobile menu using CSS and jQuery. You have to put following code on your css and js files. Put below code on any […]

How To Create Meta Boxes in WordPress

A meta box is a draggable box displayed in the post editing screen in the backend of WordPress. Users can select or enter extra information in meta boxes addition to the content in the main post editing area. There are two types of data you can enter in meta boxes: metadata (i.e. custom fields), and […]

Prevent svg translation of fontawesome icon

Add Following script in head so use below code in your current themes header.php file. And also you have to add following script before your fontawesome css link.

WordPress Change Password Form Without Plugin

Are you need simple Change Password form without plugin for your WordPress website? Yes, Then i have created [wc_change_pwd_form] shortcode with quick simple code. So you can put Change Password form anywhere like in Pages, Posts and Widget etc… Therefore you just need to put [wc_change_pwd_form] shortcode where you need Change Password form. So you […]

Adding Custom Meta Fields to Taxonomies in WordPress

For add Custom Meta Field in taxonomy use following code in your current themes functions.php file.

Add Recaptcha in Custom Form in WordPress

You have to add recaptcha external js so use following function in your current themes functions.php file Set Recaptcha element in your form. //Custom Form Name: Put below js in your current themes custom.js file. //Captcha validation script jQuery(document).ready(function($) { $(document).on(‘submit’,’.wc-captcha-form’,function(e){ if(grecaptcha.getResponse() == “”) { e.preventDefault(); $(‘.captcha-error’).text(“Please verify captcha”); } else { $(‘.captcha-error’).text(“”); } }); […]


Leave a Reply

Your email address will not be published. Required fields are marked *