- [x] predstavi se
- [x] prilagajanje wp-ja: teme in plugini. razlika?
- [x] actions
- [x] filters
- [x] the loop
- [x] style.php - metapodatki teme
- [x] functions.php - programerske nastavitve teme
- [x] poglej featured image
- [x] osnovno ogrodje
- [x] get_header(), get_footer()
- [x] have_posts(), the_post(), the_* …
- [x] http://localhost/wp/?s=hello, http://localhost/wp/?s=donava
- [x] Dodaj featured image v predlogo
/*
Theme Name: Gorgonzola
Theme URI: https://ninja.com
Author: Žiga Stopinšek
Author URI: https://sigi.stopinsek.eu
Description: Življenje in skili mlade ninje
Version: 0.1
Tags: ninja, skili, responsive, learning
*/
span.time {
font-style: italic;
font-weight: bold;
}
ul.post-categories {
list-style-type: none;
display: inline-block;
padding: 0;
margin: 0;
}
ul.post-categories li {
display: inline-block;
}
<?php
add_theme_support( 'post-thumbnails' );
<?php get_header(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php if ( has_post_thumbnail() ) : ?>
<?php the_post_thumbnail('thumbnail'); ?>
<?php endif; ?>
<h2><?php the_title() ;?></h2>
<div>
<span class="time"><?php echo the_time(); ?></span>, Kategorije: <?php echo the_category(); ?>
</div>
<?php the_content(); ?>
<?php endwhile; else : ?>
<p>Trenutno ne najdem vsebin</p>
<?php endif; ?>
<?php get_footer(); ?>