The more intended WP way but with a lot of shortcodes, will change to Gutenberg

This commit is contained in:
2026-09-06 00:14:07 +02:00
parent 4d8a7a6924
commit f8ff394db2
12 changed files with 337 additions and 839 deletions
@@ -1,27 +1,44 @@
<?php
/**
* Fallback template: generic page.
* Universal page template: renders the editor content.
*
* Page hero is shown if the page has a title and there is no [hero] shortcode
* already in the content. Any [hero] shortcode placed at the top of the editor
* replaces this automatic hero.
*/
get_header();
?>
<main>
<section class="page-hero">
<div class="container">
<h1><?php the_title(); ?></h1>
</div>
</section>
<?php
while ( have_posts() ) :
the_post();
<section class="section">
<div class="container">
<?php
while ( have_posts() ) :
the_post();
the_content();
endwhile;
$content = get_the_content();
if ( false !== strpos( $content, '[hero' ) ) {
// Hero handled inside the content via shortcode.
} else {
?>
</div>
</section>
<section class="page-hero">
<div class="container">
<h1><?php the_title(); ?></h1>
<?php if ( has_excerpt() ) : ?>
<p><?php echo esc_html( get_the_excerpt() ); ?></p>
<?php endif; ?>
</div>
</section>
<?php
}
?>
<section class="section">
<div class="container">
<div class="entry-content">
<?php the_content(); ?>
</div>
</div>
</section>
<?php endwhile; ?>
</main>
<?php