Init commit
This commit is contained in:
33
theme/template-parts/content/content-excerpt.php
Normal file
33
theme/template-parts/content/content-excerpt.php
Normal 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 FamiliaRosaTheme
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<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', 'familiarosatheme' ) );
|
||||
}
|
||||
the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
|
||||
?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php familiarosatheme_post_thumbnail(); ?>
|
||||
|
||||
<div <?php familiarosatheme_content_class( 'entry-content' ); ?>>
|
||||
<?php the_excerpt(); ?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-footer">
|
||||
<?php familiarosatheme_entry_footer(); ?>
|
||||
</footer><!-- .entry-footer -->
|
||||
|
||||
</article><!-- #post-${ID} -->
|
||||
76
theme/template-parts/content/content-none.php
Normal file
76
theme/template-parts/content/content-none.php
Normal 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 FamiliaRosaTheme
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<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:', 'familiarosatheme' ),
|
||||
get_search_query()
|
||||
);
|
||||
?>
|
||||
</h1>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'familiarosatheme' ); ?></h1>
|
||||
|
||||
<?php endif; ?>
|
||||
</header><!-- .page-header -->
|
||||
|
||||
<div <?php familiarosatheme_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’t published any posts.', 'familiarosatheme' ); ?>
|
||||
</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', 'familiarosatheme' );
|
||||
?>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
elseif ( is_search() ) :
|
||||
?>
|
||||
|
||||
<p>
|
||||
<?php esc_html_e( 'Your search generated no results. Please try a different search.', 'familiarosatheme' ); ?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
get_search_form();
|
||||
else :
|
||||
?>
|
||||
|
||||
<p>
|
||||
<?php esc_html_e( 'No content matched your request.', 'familiarosatheme' ); ?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
get_search_form();
|
||||
endif;
|
||||
?>
|
||||
</div><!-- .page-content -->
|
||||
|
||||
</section>
|
||||
60
theme/template-parts/content/content-page.php
Normal file
60
theme/template-parts/content/content-page.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying pages
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package FamiliaRosaTheme
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<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 familiarosatheme_post_thumbnail(); ?>
|
||||
|
||||
<div <?php familiarosatheme_content_class( 'entry-content' ); ?>>
|
||||
<?php
|
||||
the_content();
|
||||
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<div>' . __( 'Pages:', 'familiarosatheme' ),
|
||||
'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>', 'familiarosatheme' ),
|
||||
array(
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
get_the_title()
|
||||
)
|
||||
);
|
||||
?>
|
||||
</footer><!-- .entry-footer -->
|
||||
<?php endif; ?>
|
||||
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
||||
56
theme/template-parts/content/content-single.php
Normal file
56
theme/template-parts/content/content-single.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying single posts
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package FamiliaRosaTheme
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<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 familiarosatheme_entry_meta(); ?>
|
||||
</div><!-- .entry-meta -->
|
||||
<?php endif; ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php familiarosatheme_post_thumbnail(); ?>
|
||||
|
||||
<div <?php familiarosatheme_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>', 'familiarosatheme' ),
|
||||
array(
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
get_the_title()
|
||||
)
|
||||
);
|
||||
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<div>' . __( 'Pages:', 'familiarosatheme' ),
|
||||
'after' => '</div>',
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-footer">
|
||||
<?php familiarosatheme_entry_footer(); ?>
|
||||
</footer><!-- .entry-footer -->
|
||||
|
||||
</article><!-- #post-${ID} -->
|
||||
46
theme/template-parts/content/content.php
Normal file
46
theme/template-parts/content/content.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying posts
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package FamiliaRosaTheme
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<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', 'familiarosatheme' ) );
|
||||
}
|
||||
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 familiarosatheme_post_thumbnail(); ?>
|
||||
|
||||
<div <?php familiarosatheme_content_class( 'entry-content' ); ?>>
|
||||
<?php
|
||||
the_content();
|
||||
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<div>' . __( 'Pages:', 'familiarosatheme' ),
|
||||
'after' => '</div>',
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-footer">
|
||||
<?php familiarosatheme_entry_footer(); ?>
|
||||
</footer><!-- .entry-footer -->
|
||||
|
||||
</article><!-- #post-${ID} -->
|
||||
52
theme/template-parts/layout/footer-content.php
Normal file
52
theme/template-parts/layout/footer-content.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying the footer content
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package FamiliaRosaTheme
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<footer id="colophon">
|
||||
|
||||
<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
|
||||
<aside role="complementary" aria-label="<?php esc_attr_e( 'Footer', 'familiarosatheme' ); ?>">
|
||||
<?php dynamic_sidebar( 'sidebar-1' ); ?>
|
||||
</aside>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( has_nav_menu( 'menu-2' ) ) : ?>
|
||||
<nav aria-label="<?php esc_attr_e( 'Footer Menu', 'familiarosatheme' ); ?>">
|
||||
<?php
|
||||
wp_nav_menu(
|
||||
array(
|
||||
'theme_location' => 'menu-2',
|
||||
'menu_class' => 'footer-menu',
|
||||
'depth' => 1,
|
||||
)
|
||||
);
|
||||
?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
<div>
|
||||
<?php
|
||||
$familiarosatheme_blog_info = get_bloginfo( 'name' );
|
||||
if ( ! empty( $familiarosatheme_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/', 'familiarosatheme' ) ),
|
||||
'WordPress'
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</footer><!-- #colophon -->
|
||||
47
theme/template-parts/layout/header-content.php
Normal file
47
theme/template-parts/layout/header-content.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying the header content
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package FamiliaRosaTheme
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<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;
|
||||
|
||||
$familiarosatheme_description = get_bloginfo( 'description', 'display' );
|
||||
if ( $familiarosatheme_description || is_customize_preview() ) :
|
||||
?>
|
||||
<p><?php echo $familiarosatheme_description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<nav id="site-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'familiarosatheme' ); ?>">
|
||||
<button aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'familiarosatheme' ); ?></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 -->
|
||||
Reference in New Issue
Block a user