Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Templating changes... #1098

Merged
merged 3 commits into from
Oct 5, 2017
Merged

Templating changes... #1098

merged 3 commits into from
Oct 5, 2017

Conversation

JPOak
Copy link
Contributor

@JPOak JPOak commented Oct 2, 2017

#1094 #1091 #1057

@olefredrik @colin-marshall I realized when I went through the above issues that you needed to do them all at once. Also, they affected a lot of little things across many files. Hopefully, this PR will be helpful to get the ball rolling on changing some of the templating discussed (with some review and discussion.)

  • The wrapper should be the same across the theme with the main element.
  • The innards should mainly be controlled by content and content-page .

<header>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<h1 class="entry-title"><?php the_title(); ?></h1>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to result in multiple h1 elements on archive pages, which we don't want. There needs to be conditionals throughout this file that use is_single() to dictate different content depending on if it's a single post or an archive page.

See here for an example:
https://github.com/WordPress/twentyseventeen/blob/master/components/post/content.php

archive.php Outdated
@@ -18,7 +18,7 @@
get_header(); ?>

<div class="main-wrap" role="main">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

role="main" can be dropped from here. It belongs on the main element but we don't need it there since it's applied by default.

@olefredrik
Copy link
Owner

Hi @JPOak ! Thanks a lot for this. Haven't had time to review yet, been busy the last few days. Will review your changes tomorrow.

By the way, have you registered for Hacktoberfest yet? If not, you should. Make 4 pull requests (in any repo on Github) by the end of the month, and you'll receive a cool Hacktoberfest t-shirt.

@olefredrik
Copy link
Owner

Tested ok 👍

@olefredrik olefredrik closed this Oct 5, 2017
@olefredrik olefredrik reopened this Oct 5, 2017
@olefredrik olefredrik merged commit 344a6a9 into olefredrik:master Oct 5, 2017
@JPOak JPOak deleted the template-parts-html branch October 6, 2017 16:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants