Skip to content

Conversation

@mmirus
Copy link
Contributor

@mmirus mmirus commented Jan 15, 2019

Add embed to the template hierarchy filters in Sage, so that the embed template can be overridden from the views folder.

Closes #2142

Once this is merged, you can copy wp-includes/theme-compat/embed.php to views and adapt it however you want, just like any template file in Sage. Better yet, create views/embed.blade.php , with something like:

@include('partials.header-embed')

@if (have_posts())
  @while (have_posts()) @php the_post() @endphp
    @include('partials.embed-content')
  @endwhile
@else
  @include('partials.embed-404')
@endif

@include('partials.footer-embed')

The above assumes that you've also added embed-content, embed-404, and footer-embed templates to the partials folder, but you don't have to if you don't need to customize them.

@QWp6t QWp6t merged commit 19057f6 into master Jan 16, 2019
@QWp6t QWp6t deleted the embed-templates branch January 16, 2019 00:42
ptrckvzn added a commit to ptrckvzn/sage that referenced this pull request Jan 30, 2019
* upstream/master:
  Filter template hierarchy for embed templates (roots#2145)
  Decrease optipng level (roots#2143)
  Update sponsors [ci skip]
  Unescape post titles
  9.0.7
  When you're sloppy and forget things 😇
  Require Node 8+, also test PHP 7.2 and 7.3
  Shoutout to npm: https://npm.community/t/npm-install-downgrading-resolved-packages-from-https-to-http-registry-in-package-lock-json/1818
  Update to Bootstrap 4.2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants