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} -->
|
||||
Reference in New Issue
Block a user