De inhoud van een pagina, post of custom post heeft als belangrijkste inhoud:
Je kan die verschillende onderdelen met een eigen functie tonen.
We voorzien volgende code in index.php:
<?php
get_header();
?>
<div class="site-content">
<p><u>De titel van pagina of bericht:</u></p>
<h1><?php the_title(); ?></h1>
<p><u>De datum van creatie van pagina of bericht:</u></p>
<p><?php the_date(); ?></p>
<p><?php the_date('d/m/Y'); ?></p>
<p><u>Het featured image van pagina of bericht:</u></p>
<?php the_post_thumbnail(); ?>
<p><u>De URL van de featured image van pagina of bericht:</u></p>
<?php echo get_the_post_thumbnail_url(); ?>
<p><u>De URL van de featured image, in het grootste formaat, van pagina of bericht:</u></p>
<p><?php echo get_the_post_thumbnail_url(get_the_ID(), 'full'); ?></p>
<p><u>De samenvatting:</u></p>
<p><?php the_excerpt(); ?></p>
<p><u>De inhoud van pagina of bericht:</u></p>
<p><?php the_content(); ?></p>
<p><u>De link naar pagina of bericht:</u></p>
<a href="<?php the_permalink(); ?>">Verder lezen</a>
</div>
<?php
get_footer();
?>