WordPress is a popular open-source CMS for building and managing websites, known for its ease of use and customization.

How to add custom button to gutenberg Wordpress Editor

Using JS is one way we can achieve that,

Firstly add below code into your theme function.php

function add_scripts_editor(){
    wp_enqueue_script('mytheme', get_stylesheet_directory_uri() . '/js/mytheme.js', array('jquery'), '', true );
}
add_action('admin_enqueue_scripts', 'add_scripts_editor');

Then create mytheme.js into your js folder and add the below code into it. Now open any POST/PAGE type and your Back Button is added, you can add any link to it to navigation to your user he want to go back.

Tags

Create Your WordPress theme in 2 seconds

Hey there, This article is based on wordpress theme. Many of us know the wordpress has simple interface and very Useful CMS and easy to understand admin structure. there are plenty of themes and plugin available that helps you to look your website beautiful and useful for your users.

Today I want to tell you about a website where you can generate your own themes in just few seconds, its provides you the basic structure of your theme and then you can customize it according to your wish.

The website is underscores.me

Wordpress Error with php 7.1 - PHP Fatal error: Uncaught Error: [] operator not supported for strings

Hey,

This is error caused by php7 and later,many application will face this error Reason behind is that the php 7 will not convert the blank variable with is define as string to array:

Suppose you define a variable like below code and later you use it as array, then this error come in the picture:

$object = "";

for($x > 1){

$object[] = $x;

}

form above example you defne the $object to blank varible and later you use it as array that why you will face the error.

Subscribe to Wordpress