mirror of
https://github.com/elementor/hello-theme.git
synced 2025-10-04 15:42:19 +08:00
Hello Theme!!
This commit is contained in:
parent
9c018f72fb
commit
119e06fa75
7 changed files with 147 additions and 0 deletions
40
comments.php
Normal file
40
comments.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<section id="comments" class="comments-area">
|
||||
|
||||
<?php if ( have_comments() ) : ?>
|
||||
<h3 class="title-comments">
|
||||
<span>
|
||||
<?php printf( _n( 'One Response', '%1$s Responses', get_comments_number(), '' ), number_format_i18n( get_comments_number() ), get_the_title() ); ?>
|
||||
</span>
|
||||
</h3>
|
||||
|
||||
<?php the_comments_navigation(); ?>
|
||||
|
||||
<ol class="comment-list">
|
||||
<?php
|
||||
wp_list_comments( array(
|
||||
'style' => 'ol',
|
||||
'short_ping' => true,
|
||||
'avatar_size' => 42,
|
||||
) );
|
||||
?>
|
||||
</ol><!-- .comment-list -->
|
||||
|
||||
<?php the_comments_navigation(); ?>
|
||||
|
||||
<?php endif; // Check for have_comments(). ?>
|
||||
|
||||
<?php
|
||||
// If comments are closed and there are comments, let's leave a little note, shall we?
|
||||
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
|
||||
?>
|
||||
<p class="no-comments"><?php _e( 'Comments are closed.', 'elementor-theme' ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
comment_form( array(
|
||||
'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
|
||||
'title_reply_after' => '</h2>',
|
||||
) );
|
||||
?>
|
||||
|
||||
</section><!-- .comments-area -->
|
9
footer.php
Normal file
9
footer.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php do_action( 'elementor/theme/footer' ) ?>
|
||||
<!-- FOOTER START -->
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
<!-- FOOTER END -->
|
||||
|
||||
</body>
|
||||
</html>
|
51
functions.php
Normal file
51
functions.php
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php // _e Theme
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) { exit;
|
||||
}
|
||||
|
||||
add_action( 'elementor/theme/register_locations', function( $elementor_theme_manager ) {
|
||||
$elementor_theme_manager->register_all_core_location();
|
||||
} );
|
||||
|
||||
// Set up theme support
|
||||
function _e_setup() {
|
||||
add_theme_support( 'custom-logo', array(
|
||||
'height' => 70,
|
||||
'width' => 350,
|
||||
'flex-height' => true,
|
||||
'flex-width' => true,
|
||||
) );
|
||||
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
add_theme_support( 'title-tag' );
|
||||
add_theme_support( 'html5', array(
|
||||
'search-form',
|
||||
'comment-form',
|
||||
'comment-list',
|
||||
'gallery',
|
||||
'caption',
|
||||
) );
|
||||
|
||||
load_theme_textdomain( '_e', get_template_directory() . '/languages' );
|
||||
}
|
||||
add_action( 'after_setup_theme', '_e_setup' );
|
||||
|
||||
function _e_scripts() {
|
||||
// Theme stylesheet.
|
||||
wp_enqueue_style( '_e-style', get_stylesheet_uri() );
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', '_e_scripts' );
|
||||
|
||||
// Remove WP Emoji
|
||||
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
||||
remove_action( 'wp_print_styles', 'print_emoji_styles' );
|
||||
|
||||
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
|
||||
remove_action( 'admin_print_styles', 'print_emoji_styles' );
|
||||
|
||||
// Remove WP Embed
|
||||
function _e_deregister_scripts() {
|
||||
wp_deregister_script( 'wp-embed' );
|
||||
}
|
||||
add_action( 'wp_footer', '_e_deregister_scripts' );
|
15
header.php
Normal file
15
header.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!doctype html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="profile" href="http://gmpg.org/xfn/11">
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<!-- HEADER START -->
|
||||
|
||||
<?php do_action( 'elementor/theme/header' ) ?>
|
||||
|
||||
<!-- HEADER END -->
|
13
index.php
Normal file
13
index.php
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
get_header();
|
||||
|
||||
if ( is_singular() ) {
|
||||
do_action( 'elementor/theme/single' );
|
||||
} elseif ( is_archive() || is_home() || is_search() ) {
|
||||
do_action( 'elementor/theme/archive' );
|
||||
} else {
|
||||
do_action( 'elementor/theme/page_404' );
|
||||
}
|
||||
|
||||
get_footer();
|
BIN
screenshot.png
Normal file
BIN
screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
19
style.css
Normal file
19
style.css
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
Theme Name: Elementor Hello Theme
|
||||
Theme URI: https://elementor.com
|
||||
Description: A sample theme for Elementor.
|
||||
Author: Elementor Team
|
||||
Author URI: https://elementor.com
|
||||
Version: 1.0
|
||||
Stable tag: 1.0
|
||||
Requires at least: 4.9
|
||||
Tested up to: 4.9
|
||||
License: GNU General Public License v3 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
Text Domain: hello-theme
|
||||
*/
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue