Category: Wordpress

Create Custom Widget for footer in WordPress

October 19th, 2022 by

In this post i am going to show you how to create custom widget for footer in wordpress. First of all go to theme editor (Appearance > theme editor). select your activated theme and open functions.php file. Step 1: Add this code to your functions file. add_action( 'widgets_init', 'my_register_sidebars' ); function my_register_sidebars() { register_sidebar( array( […]

Read More »

Create Custom Sidebar in WordPress

October 19th, 2022 by

In this post i am going to show you how to create custom sidebar in wordpress. First of all go to theme editor (Appearance > theme editor). select your activated theme and open functions.php file. Step 1: Add this code to your functions file. add_action( 'widgets_init', 'my_register_sidebars' ); function my_register_sidebars() { register_sidebar( array( 'id' => […]

Read More »

Create custom page template in WordPress

October 14th, 2022 by

The appearance of all the pages and posts that are created on a WordPress website is handled by a template file named page.php. Creating or editing a custom page template in WordPress requires basic knowledge of HTML, CSS, and PHP. Simply open any text editor and write the following code in it.

Read More »

How to disable Widget block editor in WordPress

October 12th, 2022 by

Do you want to disable the new widget block editor page of Gutenberg and bring back the old widget editor? You can do that simply by adding this line into your theme’s functions.php file: function example_theme_support() { remove_theme_support( 'widgets-block-editor' ); } add_action( 'after_setup_theme', 'example_theme_support' );

Read More »

How to Redirect other URL to 404 Page WordPress

September 27th, 2022 by

You can redirect incorrect URLs to 404 page. First thing you need to create a 404.php file in your activated theme You need to add the following code as the first line in your 404.php file: header("HTTP/1.1 301 Moved Permanently"); header("Location: ".'https://www.example.com/page-not-found'); exit(); Next, you need to save the 404.php file and reupload it to […]

Read More »

How to disable block editor in WordPress

September 26th, 2022 by

Do you want to disable the new page block editor page of Gutenberg and bring back the old one? You can do that simply by adding this line into your theme’s functions.php file: add_filter('use_block_editor_for_post_type', 'd4p_32752_completly_disable_block_editor'); function d4p_32752_completly_disable_block_editor($use_block_editor) { return false; }

Read More »

Create Custom Menu in WordPress

August 31st, 2022 by

To add a custom navigation menu, the first thing you need to do is register your new navigation menu by adding this code to your theme’s functions.php file. function wpb_custom_new_menu() { register_nav_menu( ‘my-custom-menu’,__( ‘My Custom Menu’ )); } add_action( ‘init’, ‘wpb_custom_new_menu’ ); Tip: If you want to add more than one new navigation menu location, […]

Read More »