Skip to content

Instantly share code, notes, and snippets.

@jessestu
Last active March 21, 2019 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessestu/e69057abbe0bed9bbd2fb486ca00f499 to your computer and use it in GitHub Desktop.
Save jessestu/e69057abbe0bed9bbd2fb486ca00f499 to your computer and use it in GitHub Desktop.

Please go to My Site → Customize → CSS (or Additional CSS), then add all of the following code to the bottom of that window.


/* This CSS limits the posts on the homepage layout to two horizontally.
* 11437561-hc (jw)
*/
@media screen and (min-width: 1201px) {
  .posts .hentry {
    width: 50%;
  }
}

/* This CSS overrides the parallax scrolling effect on all pages.
* 11437561-hc (jw)
*/
@media screen and (min-width: 1201px) {
  .site-banner {
    position: relative;
    width: 100%;
  }
  .site-content {
    padding-top: 0 !important;
  }
  .home.is-singular .content-area, .single-format-image.has-post-thumbnail .content-area {
    padding-top: 4rem;
  }
  body:not(.is-singular) .content-area, .home .content-area, .blog .content-area, .single-format-image.has-post-thumbnail .content-area {
    margin-top: 0;
  }
  .admin-bar .site-banner {
    top: 0;
  }
}

/* This CSS makes all the homepage post tiles have the image on the left, text on the right.
* 11437561-hc (jw)
*/
@media screen and (min-width: 1201px) {
  .posts .hentry:nth-of-type(4n+3) .entry-media, .posts .hentry:nth-of-type(4n+4) .entry-media, .posts .hentry.has-post-thumbnail:nth-of-type(6n+4) .entry-media, .posts .hentry.has-post-thumbnail:nth-of-type(6n+5) .entry-media, .posts .hentry.has-post-thumbnail:nth-of-type(6n+6) .entry-media {
    float: left;
  }
  .posts .hentry:nth-of-type(4n+3) .entry-inner, .posts .hentry:nth-of-type(4n+4) .entry-inner, .posts .hentry:nth-of-type(4n+3) .edit-link, .posts .hentry:nth-of-type(4n+4) .edit-link, .posts .hentry.has-post-thumbnail:nth-of-type(6n+4) .entry-inner, .posts .hentry.has-post-thumbnail:nth-of-type(6n+5) .entry-inner, .posts .hentry.has-post-thumbnail:nth-of-type(6n+6) .entry-inner, .posts .hentry.has-post-thumbnail:nth-of-type(6n+4) .edit-link, .posts .hentry.has-post-thumbnail:nth-of-type(6n+5) .edit-link, .posts .hentry.has-post-thumbnail:nth-of-type(6n+6) .edit-link {
    left: auto;
    right: 0;
  }
}

Tip: keep the /* comment */ in the code to later know what this code does.

Example of where to add the CSS

If this image fails to load, please see it at: http://cld.wthms.co/av2gwv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment