CSS is fun and cool and I like it.
Article

Content Security Policy: The Easy Way to Prevent Mixed Content

I recently learned about a browser feature where, if you provide a special HTTP header, it will automatically post to a URL with a report of any non-HTTPS content. This would be a great thing to do when transitioning a site to HTTPS, for example, to root out any mixed content warnings. In this article, we'll implement this feature via a small WordPress plugin.… Read article

Link

WordPress + PWAs

One of the sessions from the Chrome Dev Summit, hosted by Das Surma and Daniel Walmsley. It's not so much about WordPress as it is about CMS powered sites that aren't really "apps", if there is such a thing, and the possibility of turning that site into a Progressive Web AppSite.

I find the CMS + PWA combo interesting because:

  • If you aren't stoked about AMP, and let's face it, a lot of people are not stoked
Read article
user avatar
Shared by
Chris Coyier
Article

Gutenberg

I've only just been catching up with the news about Gutenberg, the name for a revamp of the WordPress editor. You can use it right now, as it's being built as a plugin first, with the idea that eventually it goes into core. The repo has better information.

It seems to me this is the most major change to the WordPress editor in WordPress history. It also seems particularly relevant here as we were just talking about content blocks and … Read article

Article

Foxhound

As of WordPress 4.7 (December 2016), WordPress has shipped with a JSON API built right in. Wanna see? Hit up this URL right here on CSS-Tricks. There is loads of docs for it.

That JSON API can be used for all sorts of things. I think APIs are often thought about in terms of using externally, like making the data available to some other website. But it's equally interesting to think about digesting that API right on the site itself. … Read article

Article

Improving Conversations using the Perspective API

I recently came across an article by Rory Cellan-Jones about a new technology from Jigsaw, a development group at Google focused on making people safer online through technology. At the time they'd just released the first alpha version of what they call The Perspective API. It's a machine learning tool that is designed to rate a string of text (i.e. a comment) and provide you with a Toxicity Score, a number representing how toxic the text is. … Read article

Article

Poll Results: Local WordPress Development

We kicked a poll off three months ago asking y'all what kind of local development environment you set up for running WordPress locally. At the time of this writing, we got 2,623 votes, so a decent amount of significance here. Especially because the question was phrased:

If you're running WordPress locally (i.e running PHP, MySQL, and a web server), how are you doing it?

Presupposes that you are running a local environment. (Please do that.)… Read article

Article

Lazy Loading Gravatars in WordPress

Most WordPress themes show user Gravatars in the comment threads. It's a way of showing an image with the user, as associated by the email address used. It's a nice touch, and almost an expected design pattern these days.

Every one of those gravatars is an individual HTTP request though, like any other image. A comment thread with 50 comments means 50 HTTP requests, and they aren't always particularly tiny files. Yeesh.

Let's lazy load them.… Read article

Article

Slides: CSS-Tricks is a Poster Child WordPress Site

I just gave a talk at WordCamp Miami where I talked about, to some degree, how WordPress has been a great choice for CSS-Tricks over the last decade.

If I get a chance I'll try to re-give the talk to my computer locally here so there will be a way you can watch the talk with some real context.… Read article

Sponsored Article

Responsive Images in WordPress with Cloudinary, Part 2

In Part 1 of this series, I provided some background on responsive images, describing how you can add srcset and sizes attributes to an img element to serve appropriately sized image files to users of a website based on the size and capabilities of their browser and device. I also shared how WordPress used its native image resizing functionality to implement srcset and sizes automatically and how you can use an external image service like Cloudinary to extend the native … Read article

Article

A Poll on How Developers Run WordPress Locally

I really have no idea how this will turn out. I suspect a ton of you have run or are currently running WordPress locally, but I have no clear guess on what the most popular way is to do that right now.… Read article

Link

Free, faster.

Ethan Marcotte, on time- and budget-constrained organizations websites:

Between the urgency of their work and the size of their resources, spending months on a full redesign isn’t something they can afford to do. Given that, a free theme for, say, WordPress can yield a considerable amount of value, especially to budget-constrained organizations. They can launch their redesign more quickly, and continue reaching the people who need their information most.

So Ethan takes a look at a bunch of free themes, … Read article

user avatar
Shared by
Chris Coyier
Article

Deploying From Bitbucket to WordPress

Of all the projects I've worked in the last few years, there's one that stands out as my favorite: I wrote a WordPress plugin called Great Eagle (Tolkien reference) that allows my team to install and update themes and plugins from our private Bitbucket repos, via the normal wp-admin updates UI.

This plugin has blasted our dev shop through the roof when it comes to development best practices, in ways we never expected or intended. It forces us to use … Read article

Article

Develop Locally, Use Images from Production

Working on your website locally means having the files that make your website tick right there on your computer. It's common those files live in a version control repository. You work on them, and push them up to the repo when you are ready. Other people work too, and you pull their changes back down.

What might not be in that repo, are images files from the CMS. WordPress is a classic example of this. When you upload an image … Read article

Link

“the stone has been unstuck”

Matt Mullenweg, on the release of a new homepage for WordPress.org, which hasn't seen a redesign in a long time:

What’s on the page today actually isn’t that important, even though it’s better in many ways, the key is that it’s changing again, the stone has been unstuck and can now keep rolling.

I like that sentiment. With a redesign, sometimes it's not so much about the new pixels themselves, but the fact that a workflow is now in place … Read article

user avatar
Shared by
Chris Coyier
Article

Methods for Overriding Styles in WordPress

Let's say you manage a WordPress site. You chose, purchase, and install a pre-made theme. Say you added a few items you came across in the WordPress plugin directory to add some advanced features to the site. This is the awesomeness that is the WordPress ecosystem. It's relatively easy for anyone with light technical chops to get a website off the ground and wrangle together something powerful without having to build everything from scratch. It just works great and your … Read article

Link

State of the Word 2016

Some highlights-of-highlights, based on Brian Krogsgard's post:

  • BuddyPress and bbPress will get new support and engagement over the next year.
  • WordPress 4.6 was available in 50 languages the day it was released.
  • the REST API [endpoints] get included in WordPress 4.7.
  • WordPress.com is now fully on PHP7. WordPress.org will now recommend PHP7 by default.
  • There is some concern about design. "If WordPress doesn’t make changes to the interface and otherwise, [Matt Mullenweg would] expect WordPress marketshare to begin to decline
Read article
user avatar
Shared by
Chris Coyier
Link

WordPress Without Shame

Even-handed take on WordPress by Gina Trapani. I've been unapologetically on WordPress for a long time.

I also can't wait to see what the future of it will be:

Automattic’s React-based Calypso rewrite of the WordPress admin is a clear sign that at least the leaders of the community are trying to reimagine what a WordPress born in 2016 would look like. Eventually? Soon?

Read article
user avatar
Shared by
Chris Coyier
Article

Lots of ways to add an ID to the `body` element

The following is a guest post by Trishah Woolley. Over the years, Trishah has collected a ton of code snippets that do the job of adding IDs and classes based on some variable information, like the URL or data from WordPress. Each of these snippets were either collected from documentation or a similar online resource, or written by Trishah based on standard features of the language and API's involved.Read article

Article

Move a WordPress Site by Moving the Database and Files

The following is a guest post by Erez Elias. Erez recently attended a WordCamp and wrote to me inspired to write something about WordPress. We agreed this was an interesting topic, and one I've been meaning to document myself as it's something I've done about 100 times in my life and there is always one little detail I gotta look up.Read article

Link

SVG Uploads in WordPress (the Inconvenient Truth)

Bjørn Johansen covers why:

  1. It's easy to enable SVG uploads in WordPress (few lines to a functions.php file or functionality plugin)
  2. It makes sense why WordPress doesn't allow them by default.

Jake Archibald in the comments:

In hindsight there probably should have been two content types, one that treats SVG has a full document context, and the other as a simple image (how browsers treat SVG in today, which cannot execute script or initiate fetches).

Hear hear.

I also had … Read article

user avatar
Shared by
Chris Coyier
icon-link icon-logo-star icon-search icon-star