Archives: Docs

Description.

Sample Data

Most of the time we need the sample data. Basically we need sample data which includes post, pages etc. We are going to see: Overview #Overview Themes and plugins provide there own sample data such as: WooCommerce – Which provides the sample products. bbPress – Which provides the forums, topics, etc. It is hard to …

Sample Data Read More »

Yoast SEO Custom Template Variable

In this article we are going to see how to add custom template variable into the Yoast SEO plugin. We are going to read: What are the variables in Yoast? #What are the variables in Yoast? Yoast plugin provides the variables to customise the site title. Below are some examples of the variables. %%title%% %%sitename%% …

Yoast SEO Custom Template Variable Read More »

Basic Authentication

In this article we are going to see how to perform basic authentication requests with plugin JSON Basic Authentication. Table of Content Overview #Overview We can perform below operation though Rest API: Retrieve Create Update Delete For Create, Update or Delete Rest API request we need to authenticate the request. Quick Note: WordPress provides a …

Basic Authentication Read More »

WordPress Get Post Type

In this article we are going to see how to get the current post type. WordPress provide us the function get_post_type() function which return current post type. E.g. here we have created a CSS class post-<current post type>. The function get_post_type() internally call the function get_post(). So, we can pass the int|WP_Post as parameter. All of …

WordPress Get Post Type Read More »

WooCommerce Country List

Below is the country list with country code from the WooCommerce plugin. Country Code Country Name AF Afghanistan AX Åland Islands AL Albania DZ Algeria AS American Samoa AD Andorra AO Angola AI Anguilla AQ Antarctica AG Antigua and Barbuda AR Argentina AM Armenia AW Aruba AU Australia AT Austria AZ Azerbaijan BS Bahamas BH …

WooCommerce Country List Read More »

Application Passwords

In this article we are going to see all about the WordPress plugin Application Passwords. Create different applications with unique passwords for any user to manage the REST API & XML requests. Table of Content Overview #Overview In simple basic authentication REST API & XML-RPC request we use the username and the password of the …

Application Passwords Read More »

Bootstrap 4 Cheat Sheet

While development I’m always queries about how to see all the CSS classes from the Bootstrap 4. Finally I have create it. I have categories all the classes in a group. Browse the list: Heading <h2> to <h6> #Heading <h2> to <h6> .h1 .h2 .h3 .h4 .h5 .h6 Large Headings #Large Headings .lead .display-1 .display-2 …

Bootstrap 4 Cheat Sheet Read More »

WordPress Get Post ID

In this article we are going to see how to get or display the current post id? Table of Content Overview #Overview WordPress provide us two functions these are: the_ID() get_the_ID() the_ID() vs get_the_ID() #the_ID() vs get_the_ID() the_ID() #the_ID() When you want to print the current post ID then use the_ID() function. E.g. here we …

WordPress Get Post ID Read More »

Display a Shortcode without executing it

Problem #Problem Most of the times we need to display the actual shortcode into the documentation, blog post or somewhere else by without executing it. But, If that plugin is installed on our website where we use that shortcode into our documentation then that shortcode executing their markup. For example, I have created a plugin …

Display a Shortcode without executing it Read More »

User Switching

Table of Content Overview #Overview In this article, we are going to see how to use the User Switching WordPress plugin. We can test our current plugin or theme for different user roles. Create User #Create User We need to create a new user. You can create from Users > Add new page. But, I …

User Switching Read More »

Create multiple users with wp user create command

Table of Content Overview #Overview In this article we are going to see how to create multiple users with different user roles for testing the theme or plugin. I am using WP CLI command wp user create to create the users. Okay. So, lets see how use wp user create command. Syntax #Syntax wp user …

Create multiple users with wp user create command Read More »

Easy Social Share Buttons for WordPress

Description #Description Zero configuration. Simply use shortcode . Features #Features Zero configuration. Lightweight. Easy to use. Examples #Examples Below are some examples usages of showing the facebook & twitter share buttons. 1) Show facebook & twitter share buttons. Output 2) Show only Facebook button. Output 3) Show only Twitter button. Output 4) Show the social …

Easy Social Share Buttons for WordPress Read More »

Free Images for WordPress

Download Free Images from 1.4+ Million CCO public domain Images. Table of Content Description Image is one of the most important part of website. Download royalty free images/photos under CC0 public domain for your own blog. Select images/photos from 1.4 million royalty free stock photos. Features #Features Easy search from 1.4+ millions of images. Direct …

Free Images for WordPress Read More »

Get blog details with get_blog_details()

Table of Content Introduction #Introduction If you are working on multisite then you have an idea about the function get_blog_details(). The function get_blog_details() retrieve the details for a blog from the blog’s table and blog options. Syntax #Syntax get_blog_details( $fields = null, $get_all = true ) $fields = A blog ID, a blog slug, or …

Get blog details with get_blog_details() Read More »

WordPress Options API

WordPress Options API

The complete guide of WordPress Options API with examples. Table of Content Introduction #Introduction In WordPress, we have an options table that helps us to save the values into the options table. To store the values in option table WordPress use the database table wp_options Or If you have change the database table prefix of …

WordPress Options API Read More »

Scroll to Top
%d bloggers like this: