New component for Podcasts
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -8867,4 +8867,17 @@ function enqueue_custom_script() {
|
||||
wp_enqueue_script('own-custom-script', get_template_directory_uri() . '/libs/CookieNoticePro/cookienoticepro.script.js', array('jquery'), '1.0', true);
|
||||
wp_enqueue_script('custom-script', get_template_directory_uri() . '/custom-code.js', array('jquery'), '1.0.0', true);
|
||||
}
|
||||
add_action('wp_enqueue_scripts', 'enqueue_custom_script');
|
||||
add_action('wp_enqueue_scripts', 'enqueue_custom_script');
|
||||
|
||||
function podcasts_list_shortcode($atts = [], $content = null) {
|
||||
ob_start();
|
||||
|
||||
$file = get_template_directory() . '/includes/podcasts-list.php';
|
||||
if (file_exists($file)) {
|
||||
include $file;
|
||||
}
|
||||
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
add_shortcode('podcasts_list', 'podcasts_list_shortcode');
|
||||
|
||||
147
wp-content/themes/Divi/includes/podcasts-list.php
Normal file
147
wp-content/themes/Divi/includes/podcasts-list.php
Normal file
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
$podcasts = [
|
||||
[
|
||||
'title' => 'Odcinek 01',
|
||||
'date' => '21.12.2022',
|
||||
'description' => 'Prolog czyli o czym i z kim będą rozmowy o zdrowiu',
|
||||
'image' => '/wp-content/uploads/2022/12/Prolog-czyli-o-czym-i-z-kim-beda-rozmowy-o-zdrowiu-mp3-image.png',
|
||||
'link' => '/strefa-wiedzy/podcast/prolog-czyli-o-czym-i-z-kim-beda-rozmowy-o-zdrowiu/'
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 02',
|
||||
'date' => '21.12.2022',
|
||||
'description' => 'Czy głowa musi bolec? Cz.1',
|
||||
'image' => '/wp-content/uploads/2022/12/glowa-1-rafal-podcast-website-1200px.jpg',
|
||||
'link' => '/strefa-wiedzy/podcast/czy-glowa-musi-bolec-cz-1/'
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 03',
|
||||
'date' => '18.09.2025',
|
||||
'description' => 'Czy głowa musi bolec? Cz.2',
|
||||
'image' => '/wp-content/uploads/2022/08/maxresdefault.jpg',
|
||||
'link' => '/strefa-wiedzy/podcast/czy-glowa-musi-bolec-cz-2/'
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 04',
|
||||
'date' => '18.09.2025',
|
||||
'description' => 'W czym może pomóc terapeutka uroginekologiczna.',
|
||||
'image' => '/wp-content/uploads/2022/08/maxresdefault-1.jpg',
|
||||
'link' => '/strefa-wiedzy/podcast/w-czym-moze-pomoc-terapeutka-uroginekologiczna/'
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 05',
|
||||
'date' => '18.09.2025',
|
||||
'description' => 'Cesarskie cięcie, rozejście prostego brzucha i nietrzymanie moczu.',
|
||||
'image' => '/wp-content/uploads/2022/08/p5.jpg',
|
||||
'link' => '/strefa-wiedzy/podcast/cesarskie-ciecie-rozejscie-prostego-brzucha-i-nietrzymanie-moczu/'
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 06',
|
||||
'date' => '18.09.2025',
|
||||
'description' => 'Aktywność fizyczna kobiet w ciąży. Cele, znaczenie i wskazania.',
|
||||
'image' => '/wp-content/uploads/2022/08/p6.png',
|
||||
'link' => '/strefa-wiedzy/podcast/aktywnosc-fizyczna-kobiet-w-ciazy-cele-znaczenie-i-wskazania/'
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 07',
|
||||
'date' => '18.09.2025',
|
||||
'description' => '',
|
||||
'image' => '/wp-content/uploads/2022/08/p7.jpg',
|
||||
'link' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 08',
|
||||
'date' => '18.09.2025',
|
||||
'description' => '',
|
||||
'image' => '/wp-content/uploads/2022/08/p8.jpg',
|
||||
'link' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 09',
|
||||
'date' => '18.09.2025',
|
||||
'description' => '',
|
||||
'image' => '/wp-content/uploads/2022/08/p9.jpg',
|
||||
'link' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 10',
|
||||
'date' => '18.09.2025',
|
||||
'description' => '',
|
||||
'image' => '/wp-content/uploads/2022/08/p10.jpg',
|
||||
'link' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 11',
|
||||
'date' => '18.09.2025',
|
||||
'description' => '',
|
||||
'image' => '/wp-content/uploads/2022/08/p11.jpg',
|
||||
'link' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 12',
|
||||
'date' => '18.09.2025',
|
||||
'description' => '',
|
||||
'image' => '/wp-content/uploads/2022/08/p12.jpg',
|
||||
'link' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 13',
|
||||
'date' => '18.09.2025',
|
||||
'description' => '',
|
||||
'image' => '/wp-content/uploads/2022/08/p13.jpg',
|
||||
'link' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 14',
|
||||
'date' => '18.09.2025',
|
||||
'description' => '',
|
||||
'image' => '/wp-content/uploads/2022/08/p14.jpg',
|
||||
'link' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 15',
|
||||
'date' => '18.09.2025',
|
||||
'description' => '',
|
||||
'image' => '/wp-content/uploads/2022/08/p15.jpg',
|
||||
'link' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 16',
|
||||
'date' => '18.09.2025',
|
||||
'description' => '',
|
||||
'image' => '/wp-content/uploads/2022/08/p16.jpg',
|
||||
'link' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'Odcinek 17',
|
||||
'date' => '18.09.2025',
|
||||
'description' => '',
|
||||
'image' => '/wp-content/uploads/2022/08/p17.jpg',
|
||||
'link' => ''
|
||||
],
|
||||
];
|
||||
?>
|
||||
|
||||
<section id="box-podcasts">
|
||||
<div class="podcasts-lists">
|
||||
<?php foreach($podcasts as $podcast): ?>
|
||||
<?php if($podcast['link'] == '') continue; ?>
|
||||
<article class="podcast-item">
|
||||
<a href="<?php echo $podcast['link']; ?>">
|
||||
<div class="podcast-img">
|
||||
<img src="<?php echo $podcast['image']; ?>" alt="">
|
||||
</div>
|
||||
<div class="podcast-data">
|
||||
<div class="data-head">
|
||||
<span class="podcast-title"><?php echo $podcast['title']; ?></span>
|
||||
<span class="podcast-date"><?php echo $podcast['date']; ?></span>
|
||||
</div>
|
||||
<div class="data-text">
|
||||
<h2><?php echo $podcast['description']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user