Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter template hierarchy for embed templates #2145

Merged
merged 1 commit into from
Jan 16, 2019
Merged

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.

None yet

2 participants