return $comments_template;
}, 100);
+
+
+/**
+ * Handle redirection to first child page when template is set to 'template-redirect-to-first-child.php'
+ * (see template file for more details on why this has to be done here)
+ */
+add_action('template_redirect', function () {
+
+ $pageID = get_the_ID();
+
+ if (get_page_template_slug($pageID) == 'views/template-redirect-to-first-child.php') {
+
+ $children = get_pages("child_of={$pageID}&sort_column=menu_order");
+
+ if (is_array($children)) {
+ wp_safe_redirect(get_permalink($children[0]->ID));
+ exit;
+ }
+ }
+
+});
lost-utility: overlay $content-max-width 1 10px #ccc;
body
- lost-utility: overlay 960px 1 2px rgba(#fc0, 0.7);
+ lost-utility: overlay 1536px 1 2px rgba(#fc0, 0.7);
// Centre line
&:after
.elementor-button.elementor-size-xl
background-color: $colors.orange
border-radius: 999px
- padding: 1em 2em
+ padding: 2em 5em
text-align: center
- font-size: 1em
+ font-smoothing()
+ font-size: 12px
+ font-weight: 800
+ text-transform: uppercase
+ transition: all 0.3s ease-out
+
+ &:hover
+ transform: scale(1.1)
+ opacity: 0.9
&:hover
color: $colors.orange
- // Special CTA button
- .button a:hover
- color: #fff
.current_page_item, .current-menu-parent
border-bottom: 2px solid $colors.orange
left: 0
top: 100%
white-space: normal
- padding: 0
z-index: 50
- background: #1c1c1c
text-align: left
text-transform: none
font-weight: normal
transition: opacity 0.3s
font-family: $font
- padding: 5px 0
+ padding: 0
+ border-top: 2px solid $colors.orange
.current_page_item
border-bottom: none
display: block
width: 100%
padding-bottom: 0
- padding-right: 1em
margin: 0
a
font-smoothing-reset()
display: block
margin: 0
- padding: 8px 15px
+ padding: 0.5em 1em
border: 0
letter-spacing: normal
- color: #fff
+ color: $colors.orange
+ background: #fff
+
+ .hero-header &
+ background: #000
+ color: #fff
&:hover
- color: $colors.orange
+ color: #fff
+ background: $colors.orange
ul.nav
&-list
display: none
position: absolute
- left: 0
+ left: -1em
top: 100%
reset-list()
line-height: 1.8
+ li
+ padding: 0.3em 1em
+ background-color: #fff
+ color: $colors.orange
+
+ .hero-header &
+ background-color: #000
+ color: #fff
+
+ &:hover
+ background-color: $colors.orange
+ color: #fff
+
// Current active locale in submenu
&-active
font-weight: 700
+ cursor: default
// Burger menu icon
.menu-opener
&-description
font-size: 16px
+ max-width: 325px
+++ /dev/null
-{{--
- Template Name: Custom Template
---}}
-
-@extends('layouts.app')
-
-@section('content')
- @while(have_posts()) @php the_post() @endphp
- @include('partials.page-header')
- @include('partials.content-page')
- @endwhile
-@endsection
--- /dev/null
+<?php
+/**
+ * Template Name: Redirect to first child
+ */
+
+// This template is for "holder" pages that have no content but contain sub-pages.
+// If the page is visited directly, it will redirect to the first child page (if possible).
+// The first child is not based on visual menu order, it is based on the "order" field in the page.
+
+// Since the HTTP headers are already sent when this code executes, we can't do the redirect here.
+// Instead, this template is used as a marker and we check the page template in the initialisation phase
+// and redirect from there...
+
+// See template_redirect action in theme's app/filters.php