Fixing double echo's, template cleanup

This commit is contained in:
Kalen Johnson
2016-12-06 15:24:15 -08:00
parent b7742fd86f
commit 3dadb86ec2
14 changed files with 43 additions and 49 deletions

View File

@@ -7,13 +7,12 @@
<div class="alert alert-warning">
{{ __('Sorry, no results were found.', 'sage') }}
</div>
{{ get_search_form(false) }}
{!! get_search_form(false) !!}
@endif
@while(have_posts())
{!! the_post() !!}
@while (have_posts()) @php the_post() @endphp
@include ('partials.content')
@endwhile
{{ get_the_posts_navigation() }}
{!! get_the_posts_navigation() !!}
@endsection

View File

@@ -1,13 +1,13 @@
<!doctype html>
<html {!! language_attributes() !!}>
<html @php language_attributes() @endphp>
@include('partials.head')
<body {!! body_class() !!}>
<body @php body_class() @endphp>
<!--[if IE]>
<div class="alert alert-warning">
{!! _e('You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.', 'sage') !!}
{!! __('You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.', 'sage') !!}
</div>
<![endif]-->
{!! do_action('get_header') !!}
@php do_action('get_header') @endphp
@include('partials.header')
<div class="wrap container" role="document">
<div class="content row">
@@ -21,8 +21,8 @@
@endif
</div>
</div>
{!! do_action('get_footer') !!}
@php do_action('get_footer') @endphp
@include('partials.footer')
{!! wp_footer() !!}
@php wp_footer() @endphp
</body>
</html>

View File

@@ -1,8 +1,7 @@
@extends('layouts.base')
@section('content')
@while(have_posts())
{!! the_post() !!}
@while(have_posts()) @php the_post() @endphp
@include('partials.page-header')
@include('partials.content-page')
@endwhile

View File

@@ -1,8 +1,8 @@
<?php
@php
if (post_password_required()) {
return;
}
?>
@endphp
<section id="comments" class="comments">
@if (have_comments())
@@ -34,5 +34,5 @@ if (post_password_required()) {
</div>
@endif
{!! comment_form() !!}
@php comment_form() @endphp
</section>

View File

@@ -1,2 +1,2 @@
{!! the_content() !!}
@php the_content() @endphp
{!! wp_link_pages(['before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}

View File

@@ -1,4 +1,4 @@
<article {!! post_class() !!}>
<article @php post_class() @endphp>
<header>
<h2 class="entry-title"><a href="{{ get_permalink() }}">{{ get_the_title() }}</a></h2>
@if (get_post_type() === 'post')
@@ -6,6 +6,6 @@
@endif
</header>
<div class="entry-summary">
{!! the_excerpt() !!}
@php the_excerpt() @endphp
</div>
</article>

View File

@@ -1,13 +1,13 @@
<article {!! post_class() !!}>
<article @php post_class() @endphp>
<header>
<h1 class="entry-title">{{ get_the_title() }}</h1>
@include('partials/entry-meta')
</header>
<div class="entry-content">
{!! the_content() !!}
@php the_content() @endphp
</div>
<footer>
{!! wp_link_pages(['before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}
</footer>
{!! comments_template('/templates/partials/comments.blade.php') !!}
@php comments_template('/templates/partials/comments.blade.php') @endphp
</article>

View File

@@ -1,9 +1,9 @@
<article {!! post_class() !!}>
<article @php post_class() @endphp>
<header>
<h2 class="entry-title"><a href="{{ get_permalink() }}">{{ get_the_title() }}</a></h2>
@include('partials/entry-meta')
</header>
<div class="entry-summary">
{!! the_excerpt() !!}
@php the_excerpt() @endphp
</div>
</article>

View File

@@ -2,5 +2,5 @@
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{!! wp_head() !!}
@php wp_head() @endphp
</head>

View File

@@ -1,6 +1,6 @@
<header class="banner">
<div class="container">
<a class="brand" href="{{ esc_url(home_url('/')) }}">{{ get_bloginfo('name', 'display') }}</a>
<a class="brand" href="{{ home_url('/') }}">{{ get_bloginfo('name', 'display') }}</a>
<nav class="nav-primary">
@if (has_nav_menu('primary_navigation'))
{!! wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav']) !!}

View File

@@ -10,11 +10,9 @@
{!! get_search_form(false) !!}
@endif
@while(have_posts())
{!! the_post() !!}
@while(have_posts()) @php the_post() @endphp
@include('partials.content-search')
@endwhile
{{ get_the_posts_navigation() }}
{!! get_the_posts_navigation() !!}
@endsection

View File

@@ -1,8 +1,7 @@
@extends('layouts.base')
@section('content')
@while(have_posts())
{!! the_post() !!}
@while(have_posts()) @php the_post() @endphp
@include('partials/content-single')
@endwhile
@endsection

View File

@@ -1,14 +1,13 @@
<?php
@php
/**
* Template Name: Custom Template
*/
?>
@endphp
@extends('layouts.base')
@section('content')
@while(have_posts())
{!! the_post() !!}
@while(have_posts()) @php the_post() @endphp
@include('partials.page-header')
@include('partials.content-page')
@endwhile