init commit

This commit is contained in:
2024-06-05 17:37:13 +00:00
commit 7a1361419a
52 changed files with 2693 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
/**
* Template part for displaying post archives and search results
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Valier
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
if ( is_sticky() && is_home() && ! is_paged() ) {
printf( '%s', esc_html_x( 'Featured', 'post', 'valier' ) );
}
the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
?>
</header><!-- .entry-header -->
<?php vlr_post_thumbnail(); ?>
<div <?php vlr_content_class( 'entry-content' ); ?>>
<?php the_excerpt(); ?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php vlr_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-${ID} -->

View File

@@ -0,0 +1,76 @@
<?php
/**
* Template part for displaying a message when posts are not found
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Valier
*/
?>
<section>
<header class="page-header">
<?php if ( is_search() ) : ?>
<h1 class="page-title">
<?php
printf(
/* translators: 1: search result title. 2: search term. */
'<h1 class="page-title">%1$s <span>%2$s</span></h1>',
esc_html__( 'Search results for:', 'valier' ),
get_search_query()
);
?>
</h1>
<?php else : ?>
<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'valier' ); ?></h1>
<?php endif; ?>
</header><!-- .page-header -->
<div <?php vlr_content_class( 'page-content' ); ?>>
<?php
if ( is_home() && current_user_can( 'publish_posts' ) ) :
?>
<p>
<?php esc_html_e( 'Your site is set to show the most recent posts on your homepage, but you haven&rsquo;t published any posts.', 'valier' ); ?>
</p>
<p>
<a href="<?php echo esc_url( admin_url( 'edit.php' ) ); ?>">
<?php
/* translators: 1: link to WP admin new post page. */
esc_html_e( 'Add or publish posts', 'valier' );
?>
</a>
</p>
<?php
elseif ( is_search() ) :
?>
<p>
<?php esc_html_e( 'Your search generated no results. Please try a different search.', 'valier' ); ?>
</p>
<?php
get_search_form();
else :
?>
<p>
<?php esc_html_e( 'No content matched your request.', 'valier' ); ?>
</p>
<?php
get_search_form();
endif;
?>
</div><!-- .page-content -->
</section>

View File

@@ -0,0 +1,60 @@
<?php
/**
* Template part for displaying pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Valier
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
if ( ! is_front_page() ) {
the_title( '<h1 class="entry-title">', '</h1>' );
} else {
the_title( '<h2 class="entry-title">', '</h2>' );
}
?>
</header><!-- .entry-header -->
<?php vlr_post_thumbnail(); ?>
<div <?php vlr_content_class( 'entry-content' ); ?>>
<?php
the_content();
wp_link_pages(
array(
'before' => '<div>' . __( 'Pages:', 'valier' ),
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<?php if ( get_edit_post_link() ) : ?>
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers. */
__( 'Edit <span class="sr-only">%s</span>', 'valier' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
)
);
?>
</footer><!-- .entry-footer -->
<?php endif; ?>
</article><!-- #post-<?php the_ID(); ?> -->

View File

@@ -0,0 +1,56 @@
<?php
/**
* Template part for displaying single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Valier
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<?php if ( ! is_page() ) : ?>
<div class="entry-meta">
<?php vlr_entry_meta(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<?php vlr_post_thumbnail(); ?>
<div <?php vlr_content_class( 'entry-content' ); ?>>
<?php
the_content(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers. */
__( 'Continue reading<span class="sr-only"> "%s"</span>', 'valier' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
)
);
wp_link_pages(
array(
'before' => '<div>' . __( 'Pages:', 'valier' ),
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php vlr_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-${ID} -->

View File

@@ -0,0 +1,46 @@
<?php
/**
* Template part for displaying posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Valier
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
if ( is_sticky() && is_home() && ! is_paged() ) {
printf( '<span">%s</span>', esc_html_x( 'Featured', 'post', 'valier' ) );
}
if ( is_singular() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
endif;
?>
</header><!-- .entry-header -->
<?php vlr_post_thumbnail(); ?>
<div <?php vlr_content_class( 'entry-content' ); ?>>
<?php
the_content();
wp_link_pages(
array(
'before' => '<div>' . __( 'Pages:', 'valier' ),
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php vlr_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-${ID} -->

View File

@@ -0,0 +1,52 @@
<?php
/**
* Template part for displaying the footer content
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Valier
*/
?>
<footer id="colophon">
<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
<aside role="complementary" aria-label="<?php esc_attr_e( 'Footer', 'valier' ); ?>">
<?php dynamic_sidebar( 'sidebar-1' ); ?>
</aside>
<?php endif; ?>
<?php if ( has_nav_menu( 'menu-2' ) ) : ?>
<nav aria-label="<?php esc_attr_e( 'Footer Menu', 'valier' ); ?>">
<?php
wp_nav_menu(
array(
'theme_location' => 'menu-2',
'menu_class' => 'footer-menu',
'depth' => 1,
)
);
?>
</nav>
<?php endif; ?>
<div>
<?php
$vlr_blog_info = get_bloginfo( 'name' );
if ( ! empty( $vlr_blog_info ) ) :
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>,
<?php
endif;
/* translators: 1: WordPress link, 2: WordPress. */
printf(
'<a href="%1$s">proudly powered by %2$s</a>.',
esc_url( __( 'https://wordpress.org/', 'valier' ) ),
'WordPress'
);
?>
</div>
</footer><!-- #colophon -->

View File

@@ -0,0 +1,47 @@
<?php
/**
* Template part for displaying the header content
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Valier
*/
?>
<header id="masthead">
<div>
<?php
if ( is_front_page() ) :
?>
<h1><?php bloginfo( 'name' ); ?></h1>
<?php
else :
?>
<p><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php
endif;
$vlr_description = get_bloginfo( 'description', 'display' );
if ( $vlr_description || is_customize_preview() ) :
?>
<p><?php echo $vlr_description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
<?php endif; ?>
</div>
<nav id="site-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'valier' ); ?>">
<button aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'valier' ); ?></button>
<?php
wp_nav_menu(
array(
'theme_location' => 'menu-1',
'menu_id' => 'primary-menu',
'items_wrap' => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
)
);
?>
</nav><!-- #site-navigation -->
</header><!-- #masthead -->