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

@@ -3,9 +3,9 @@
@section('content')
@include('partials.page-header')
@if(!have_posts())
@if (!have_posts())
<div class="alert alert-warning">
{{ __('Sorry, but the page you were trying to view does not exist.', 'sage') }}
{{ __('Sorry, but the page you were trying to view does not exist.', 'sage') }}
</div>
{!! get_search_form(false) !!}
@endif

View File

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

View File

@@ -1,28 +1,28 @@
<!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">
<main class="main">
@yield('content')
</main>
@if(App\display_sidebar())
@if (App\display_sidebar())
<aside class="sidebar">
@include('partials.sidebar')
</aside>
@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,11 +1,11 @@
<?php
@php
if (post_password_required()) {
return;
}
?>
@endphp
<section id="comments" class="comments">
@if(have_comments())
@if (have_comments())
<h2>
{!! sprintf(_nx('One response to &ldquo;%2$s&rdquo;', '%1$s responses to &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'sage'), number_format_i18n(get_comments_number()), '<span>' . get_the_title() . '</span>') !!}
</h2>
@@ -14,13 +14,13 @@ if (post_password_required()) {
{!! wp_list_comments(['style' => 'ol', 'short_ping' => true]) !!}
</ol>
@if(get_comment_pages_count() > 1 && get_option('page_comments'))
@if (get_comment_pages_count() > 1 && get_option('page_comments'))
<nav>
<ul class="pager">
@if(get_previous_comments_link())
@if (get_previous_comments_link())
<li class="previous">{!! previous_comments_link(__('&larr; Older comments', 'sage')) !!}</li>
@endif
@if(get_next_comments_link())
@if (get_next_comments_link())
<li class="next">{!! next_comments_link(__('Newer comments &rarr;', 'sage')) !!}</li>
@endif
</ul>
@@ -28,11 +28,11 @@ if (post_password_required()) {
@endif
@endif
@if(!comments_open() && get_comments_number() != '0' && post_type_supports(get_post_type(), 'comments'))
@if (!comments_open() && get_comments_number() != '0' && post_type_supports(get_post_type(), 'comments'))
<div class="alert alert-warning">
{{ __('Comments are closed.', 'sage') }}
</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,11 +1,11 @@
<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')
@if (get_post_type() === 'post')
@include('partials/entry-meta')
@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,8 +1,8 @@
<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'))
@if (has_nav_menu('primary_navigation'))
{!! wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav']) !!}
@endif
</nav>

View File

@@ -3,18 +3,16 @@
@section('content')
@include('partials.page-header')
@if(!have_posts())
@if (!have_posts())
<div class="alert alert-warning">
{{ __('Sorry, no results were found.', 'sage') }}
</div>
{!! 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