How to Create custom Shortcode in WordPress

In WordPress, Shortcode is special tags which specified within the [] brackets and use on the page, post, and widget.

The code is replaced with some other content when previewing the page.

It can also take parameters.

Shortcode is flexible and allows you to place it wherever you want.

In this tutorial, I will show how you can simply create Shortcode with or without parameters and use in WordPress.

In the example, I am creating Shortcodes in the WordPress theme.

How to Create custom Shortcode in WordPress

Read more

How to Toggle CSS Classes and Styles with Vue.js

Sometimes it is required to control the flow of the CSS classes and style properties of the element based on the expression at runtime.

In Vue.js there is a v-bind directive to update the HTML attribute.

In this tutorial, I am using this on class v-bind:class and style v-bind:style.

The v-bind:class adds and removes classes from the elements without affecting the value of the class attribute.

In the demonstration, I am using the v-bind directive to dynamically toggle CSS class and style property from the element on a click.

How to Toggle CSS Classes and Styles with Vue.js

Read more

How to Add Speech Recognition to the Website – JavaScript

With the use of Speech Recognition API, you can enable the web browser to take speech input on the page and convert it into text.

For accessing this on the page need to allow microphone access by the user.

In this tutorial, I am creating an example where allowing the users to search posts by speech. On the basis of speech recognition display response on the screen using jQuery AJAX.

How to Add Speech Recognition to the Website – JavaScript

Read more