v1.5.0: extend theme with navigation dropdowns, 9 page templates, auth UI, newsletter, contact panel
Major theme extension adding full-featured navigation with dropdown submenus (Tools, My Data, Resources), 9 new page templates (Calculator, Protocol Builder, Tracker, Subject Log, Documentation, Directory, Science Feed, Profile, Sign In/Register), documentation page with sidebar ToC and scroll spy, branded AJAX authentication forms, newsletter signup with admin export, slide-out contact/support panel, Research Modules 6-card grid on front page, and comprehensive footer update. Split functions.php (554→206 lines) into 6 focused inc/ modules: helpers, customizer, auth-handlers, contact-handler, page-setup, newsletter-admin. All new components include dark mode support, CSRF protection, input sanitization, output escaping, and graceful plugin degradation via shortcode_exists(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,13 @@
|
||||
/**
|
||||
* The front page template
|
||||
*
|
||||
* Layout: Hero → Research Modules → PRAutoBlogger posts → Peptide News feed.
|
||||
* Newsletter signup is handled by footer.php (via template part) on the front page.
|
||||
*
|
||||
* @see template-parts/module-cards.php — research modules grid
|
||||
* @see template-parts/newsletter-signup.php — included via footer.php on front page
|
||||
* @see functions.php — helper functions for hero content
|
||||
*
|
||||
* @package peptide-starter
|
||||
*/
|
||||
|
||||
@@ -15,8 +22,8 @@ get_header();
|
||||
<h1 class="hero-title">
|
||||
<?php
|
||||
$hero_title = peptide_starter_get_hero_title();
|
||||
// Wrap the last word in an accent span for the wavy underline effect
|
||||
$words = explode( ' ', $hero_title );
|
||||
// Wrap the last word in an accent span for the wavy underline effect.
|
||||
$words = explode( ' ', $hero_title );
|
||||
if ( count( $words ) > 1 ) {
|
||||
$last_word = array_pop( $words );
|
||||
echo esc_html( implode( ' ', $words ) ) . ' <span class="ps-hero-accent">' . esc_html( $last_word ) . '</span>';
|
||||
@@ -53,13 +60,16 @@ get_header();
|
||||
<a href="<?php echo esc_url( home_url( '/peptides' ) ); ?>" class="ps-btn ps-btn-primary">
|
||||
<?php esc_html_e( 'Browse Peptides', 'peptide-starter' ); ?>
|
||||
</a>
|
||||
<a href="<?php echo esc_url( home_url( '/about' ) ); ?>" class="ps-btn ps-btn-secondary">
|
||||
<?php esc_html_e( 'Learn More', 'peptide-starter' ); ?>
|
||||
<a href="<?php echo esc_url( home_url( '/documentation' ) ); ?>" class="ps-btn ps-btn-secondary">
|
||||
<?php esc_html_e( 'Documentation', 'peptide-starter' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Research Modules Grid (6 cards) -->
|
||||
<?php get_template_part( 'template-parts/module', 'cards' ); ?>
|
||||
|
||||
<!-- PRAutoBlogger Posts Widget -->
|
||||
<?php
|
||||
if ( shortcode_exists( 'prautoblogger_posts' ) ) {
|
||||
@@ -69,7 +79,6 @@ get_header();
|
||||
|
||||
<!-- News Feed Section -->
|
||||
<?php
|
||||
// Display the Peptide News plugin shortcode if available
|
||||
if ( shortcode_exists( 'peptide_news' ) ) {
|
||||
?>
|
||||
<section class="news-feed-section">
|
||||
@@ -86,12 +95,6 @@ get_header();
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
// Note: The front page layout is handled entirely by this template.
|
||||
// Old page content (e.g. from Elementor) is intentionally NOT rendered here
|
||||
// to avoid duplicate hero sections and empty space.
|
||||
?>
|
||||
</main>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
|
||||
Reference in New Issue
Block a user