top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to create a separate custom 404 page for a WordPress site?

0 votes
328 views

I want to create a separate custom 404 page for my wordpress site that when 404 error occurs then that page will be display. I create a 404 page but when I tried to test it, the 404 page of the root site appears. Can anybody help me?

posted May 31, 2017 by Sanam

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Put a .htaccess file in the subfolder and have it contain:

ErrorDocument 404 /404.html

Where /404.html is the path to the correct 404 page.

answer Jun 8, 2017 by Naveen Kumar
Similar Questions
0 votes

I want to change a role in my wordpress plugin.

if ( is_admin() && ! is_user_logged_in() && ! defined( 'DOING_AJAX' ) && $pagenow !== 'admin-post.php' ) {
            wp_die( __( 'This has been disabled', 'wp-hide-login' ), 403 );
        }

        $request = parse_url( $_SERVER['REQUEST_URI'] );

When my plugin get the action, Wordpress shows "This has been disabled" under WP default (admin-post.php) page. But I need when my function get assign it's redirect to 404 page.

As like as "This has been disabled" > http://www.example.com/404

0 votes

I am making a custom plugin for wordpress and i need to create a page in the admin menu. I already have a file called menu_list.php with the following code:

function jps_mail_list_page_entry() {
add_menu_page(
    __('JPS Mailing List'),
    'JPS Mailing List',
    'manage_options',
    'jpsNews_mailinglist',
    'jpsNews_mailing_list',
    'dashicons-email'
);
}
add_action('admin_menu', 'jps_mail_list_page_entry');

function jpsNews_mailing_list() {
    echo 'hello';
}

Now, in the plugin page i have this:

function jpsNews_activate_plugin() {
    include_once(plugin_dir_path(__FILE__).'pages/mailing-list.php');
}
register_activation_hook(__FILE__,'jpsNews_activate_plugin');

Its not working. How can i do it?

0 votes

I just created a custom theme for my wordpress project inside my wp-content/themes/mycustomtheme, I added an index.php and a style.css file to the new theme but when I go to themes in my dashboard the newly created theme is not shown as an option. What else am I missing? Can anybody help me?
This is my style.css

/*
Theme Name: Start WordPress
Theme URI: http://wordpress.org/themes/startwordpress
Author: Me
Author URI: http://wordpress.org/
Description: The Start WordPress theme is my first custom theme.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: bootstrap, black, brown, orange, tan, white, yellow, light, one-
column, two-columns, right-sidebar, flexible-width, custom-header, 
custom-menu, editor-style, featured-images, microformats, post-
formats, rtl-language-support, sticky-post, translation-ready
Text Domain: startwordpress

This theme, like WordPress, is licensed under the GPL .
Use it to make something cool, have fun, and share what you've learned   
with others.
*/
0 votes

I want to create a blank white page in my wordpress site.

...