top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to create a blank white page in Wordpress?

0 votes
546 views

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

posted May 12, 2017 by Navya

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

1 Answer

0 votes

Put the code below in an empty file and save it as "empty-page.php"
Code:

<?php
/*
Template Name: The Empty Stuff
*/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <title>Title goes here</title>
    </head>
    <body class="empty">
        <div class="boo">
        <?php the_content(); ?>
        </div><!--end boo--> 
    </body>
</html>

Make sure you define in your stylesheet (style.css) the "empty" & "boo" classes. E.g. center the div, give it top margin etc...
Then make a new Page in WP > select as Page template this one (i.e empty-page). You can give it a title for yourself (but it won't display it) publicly. Whatever you will put into the text/content area (image, text etc.) will be shown on the 'front-end' of your Page.

answer May 18, 2017 by Sumanta Hazra
Similar Questions
0 votes

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?

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 want to create a database table with a column corresponding to the time in my wordpress site, so that I can save user actions into this table and know when they did it.

Creating a table:

$sql = "CREATE TABLE IF NOT EXISTS $table_name (
        id INT NOT NULL AUTO_INCREMENT,
        actiontime NOT NULL DATETIME,
        PRIMARY KEY (id)
    ) $charset_collSate;";
    require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    // execute the query
    dbDelta( $sql );

Is this correct?

I would want a time stamp such that I can get the difference on minute/second intervals.

0 votes

I want to create a shortcode for category title in wordpress to display the category name, and I found this code:

function categories_list_func( $atts ){
 $categories = get_the_category();

     if($categories) {
        foreach($categories as $category) {
            $output .= '<li class="cat-' . $category->cat_ID . '"><a href="'.get_category_link( $category->term_id ).'" title="' . esc_attr( sprintf( __( "Read more posts from : %s" ), $category->name ) ) . '">'.$category->cat_name.'</a></li>';
        }
        $second_output = trim($output);
      }
      $return_string = '<h4>'.__( "Categories :", "my_site").'</h4><div class="overflow"><ul class="post-categories">' . $second_output . '</ul></div>';

 return $return_string;

} // END Categories
add_shortcode( 'categories-list', 'categories_list_func' );

Can anybody help me how I create this shortcode?

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.
*/
...