first commit
This commit is contained in:
51
wp-content/themes/aac/template-parts/content-none.php
Normal file
51
wp-content/themes/aac/template-parts/content-none.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying a message that posts cannot be found
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package aac
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<section class="no-results not-found">
|
||||
<header class="page-header">
|
||||
<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'aac' ); ?></h1>
|
||||
</header><!-- .page-header -->
|
||||
|
||||
<div class="page-content">
|
||||
<?php
|
||||
if ( is_home() && current_user_can( 'publish_posts' ) ) :
|
||||
|
||||
printf(
|
||||
'<p>' . wp_kses(
|
||||
/* translators: 1: link to WP admin new post page. */
|
||||
__( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'aac' ),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
)
|
||||
) . '</p>',
|
||||
esc_url( admin_url( 'post-new.php' ) )
|
||||
);
|
||||
|
||||
elseif ( is_search() ) :
|
||||
?>
|
||||
|
||||
<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'aac' ); ?></p>
|
||||
<?php
|
||||
get_search_form();
|
||||
|
||||
else :
|
||||
?>
|
||||
|
||||
<p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'aac' ); ?></p>
|
||||
<?php
|
||||
get_search_form();
|
||||
|
||||
endif;
|
||||
?>
|
||||
</div><!-- .page-content -->
|
||||
</section><!-- .no-results -->
|
||||
54
wp-content/themes/aac/template-parts/content-page.php
Normal file
54
wp-content/themes/aac/template-parts/content-page.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying page content in page.php
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package aac
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php aac_post_thumbnail(); ?>
|
||||
|
||||
<div class="entry-content">
|
||||
<?php
|
||||
the_content();
|
||||
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'aac' ),
|
||||
'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="screen-reader-text">%s</span>', 'aac' ),
|
||||
array(
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
wp_kses_post( get_the_title() )
|
||||
),
|
||||
'<span class="edit-link">',
|
||||
'</span>'
|
||||
);
|
||||
?>
|
||||
</footer><!-- .entry-footer -->
|
||||
<?php endif; ?>
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
||||
134
wp-content/themes/aac/template-parts/content-podcast.php
Normal file
134
wp-content/themes/aac/template-parts/content-podcast.php
Normal file
@@ -0,0 +1,134 @@
|
||||
|
||||
<?php
|
||||
$current_id = get_the_ID();
|
||||
|
||||
$prev_post = get_posts([
|
||||
'post_type' => 'podcasty',
|
||||
'posts_per_page' => 1,
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC',
|
||||
'date_query' => [
|
||||
['before' => get_the_date('Y-m-d H:i:s', $current_id)]
|
||||
],
|
||||
]);
|
||||
|
||||
$next_post = get_posts([
|
||||
'post_type' => 'podcasty',
|
||||
'posts_per_page' => 1,
|
||||
'orderby' => 'date',
|
||||
'order' => 'ASC',
|
||||
'date_query' => [
|
||||
['after' => get_the_date('Y-m-d H:i:s', $current_id)]
|
||||
],
|
||||
]);
|
||||
|
||||
$time = get_field('time');
|
||||
$links = get_field('links');
|
||||
$iframe = get_field('iframe');
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> type="podcast">
|
||||
<div class="a-box-1">
|
||||
<div class="box-bg">
|
||||
<img src="/wp-content/uploads/2025/10/Frame-364.png" alt="">
|
||||
</div>
|
||||
|
||||
<div class="a-row a-row-1">
|
||||
<div class="a-col-1">
|
||||
<ol>
|
||||
<li>
|
||||
<a href="<?php echo get_permalink(125); ?>" class="btn-2">
|
||||
<img src="/wp-content/uploads/2025/10/ArrowBendUpLeft-1.svg" alt="">
|
||||
<span>Wszystkie odcinki</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if (!empty($time)): ?>
|
||||
<li>
|
||||
<span>Czas trwania: <?php echo $time; ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li>
|
||||
<span><?php echo get_the_date('j F Y'); ?></span>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<div class="a-box-title">
|
||||
<h1><?php the_title(); ?></h1>
|
||||
</div>
|
||||
<div class="a-box-text">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="a-col-2">
|
||||
<div class="box-img">
|
||||
<?php the_post_thumbnail('full', ['alt' => get_the_title()]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="a-row a-row-2">
|
||||
<div class="a-col-1">
|
||||
<nav>
|
||||
<?php if (!empty($links)): ?>
|
||||
<ul>
|
||||
<?php foreach ($links as $link) : ?>
|
||||
<?php
|
||||
$icon_color = $link['icon_color'] ?? '';
|
||||
$btn_color = $link['btn_color'] ?? '';
|
||||
?>
|
||||
<li>
|
||||
<a href="#" class="btn-social" style="background-color: <?php echo $btn_color; ?>;">
|
||||
<div class="btn-icon">
|
||||
<span style="color: <?php echo $icon_color; ?>;" class="dashicons <?php echo esc_attr($link['icon']); ?>"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?php echo $link['btn']['title']; ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="a-box-2">
|
||||
<div class="a-row a-row-1">
|
||||
<?php if (!empty($iframe)) {
|
||||
echo $iframe;
|
||||
}?>
|
||||
</div>
|
||||
<div class="a-row a-row-2">
|
||||
<ol>
|
||||
<?php if (!empty($prev_post)): ?>
|
||||
<li>
|
||||
<a href="<?php echo get_permalink($prev_post[0]->ID); ?>" class="btn-2">
|
||||
<div class="btn-icon">
|
||||
<img src="/wp-content/uploads/2025/10/ArrowLeft.svg" alt="">
|
||||
</div>
|
||||
<span>Poprzedni odcinek</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<li>
|
||||
<a href="<?php echo get_permalink(125); ?>" class="btn-2">
|
||||
<span>Wszystkie odcinki</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php if (!empty($next_post)): ?>
|
||||
<li>
|
||||
<a href="<?php echo get_permalink($next_post[0]->ID); ?>" class="btn-2">
|
||||
<span>Następny odcinek</span>
|
||||
<div class="btn-icon">
|
||||
<img src="/wp-content/uploads/2025/10/ArrowRight-1.svg" alt="">
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
35
wp-content/themes/aac/template-parts/content-search.php
Normal file
35
wp-content/themes/aac/template-parts/content-search.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying results in search pages
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package aac
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
|
||||
|
||||
<?php if ( 'post' === get_post_type() ) : ?>
|
||||
<div class="entry-meta">
|
||||
<?php
|
||||
aac_posted_on();
|
||||
aac_posted_by();
|
||||
?>
|
||||
</div><!-- .entry-meta -->
|
||||
<?php endif; ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php aac_post_thumbnail(); ?>
|
||||
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
|
||||
<footer class="entry-footer">
|
||||
<?php aac_entry_footer(); ?>
|
||||
</footer><!-- .entry-footer -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
||||
56
wp-content/themes/aac/template-parts/content.php
Normal file
56
wp-content/themes/aac/template-parts/content.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying posts
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package aac
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> type="article">
|
||||
<header class="article-header">
|
||||
<a href="<?php echo get_permalink(94); ?>" class="btn-1">
|
||||
<img src="/wp-content/uploads/2025/10/ArrowBendUpLeft.svg" alt="">
|
||||
<span>Wszystkie artykuły</span>
|
||||
</a>
|
||||
</header>
|
||||
|
||||
<div class="article-data">
|
||||
<?php if (get_the_category()) : ?>
|
||||
<ol class="article-tags">
|
||||
<?php foreach (get_the_category() as $item) : ?>
|
||||
<li><span><?php echo $item->name; ?></span></li>
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
||||
<?php endif; ?>
|
||||
<div class="article-content">
|
||||
<?php
|
||||
the_content(
|
||||
sprintf(
|
||||
wp_kses(
|
||||
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'aac' ),
|
||||
array(
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
wp_kses_post( get_the_title() )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<footer class="article-footer">
|
||||
<div class="footer-title">
|
||||
<h2>Dziękujemy za przeczytanie tego artykułu!</h2>
|
||||
</div>
|
||||
<a href="<?php echo get_permalink(94); ?>" class="btn-3">
|
||||
<span>Wszystkie artykuły</span>
|
||||
<img src="/wp-content/uploads/2025/10/ArrowRight.svg" alt="">
|
||||
</a>
|
||||
</footer>
|
||||
</div>
|
||||
</article>
|
||||
Reference in New Issue
Block a user