single.php / page.php
Kurz-URL: <input class="shortlink" type="text" value="<?php echo wp_get_shortlink(get_the_ID()); ?>" onclick="this.focus(); this.select();" />
style.css
.shortlink { font-family:Arial, Sans-Serif; }
single.php / page.php
Kurz-URL: <input class="shortlink" type="text" value="<?php echo wp_get_shortlink(get_the_ID()); ?>" onclick="this.focus(); this.select();" />
style.css
.shortlink { font-family:Arial, Sans-Serif; }
page.php bzw. custompage.php
$archive_query = new WP_Query('category_name=KATEGORIENAME&posts_per_page=-1');
?>
<?php if ($archive_query->have_posts()) : ?>
<?php $oldyear = $postyear = get_the_time('Y', $post->ID); ?>
<h4><?php echo $postyear; ?></h4>
<ul class="archive-posts"><?php
while ($archive_query->have_posts()) {
$archive_query->the_post();
$postyear = get_the_time('Y', $post->ID);
if ($oldyear != $postyear) {
$oldyear = $postyear; ?>
</ul><h4><?php echo $postyear; ?></h4><ul>
<?php
} ?>
<li><?php the_time('d. F'); ?>: <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li><?php
}
echo '</ul>';
else :
endif;
wp_reset_query(); ?>
Ergebnis ist eine Liste in folgender Form