Blog

Featured images: too much of a good thing

I like featured images. In moderation. But nothing about WordPress irritates me more than when themes display them … everywhere.

On the homepage is fine — in fact, it’s the only place I prefer to see them, in some kind of design element whether it be a slideshow or a grid of images that serve a functional purpose to show the readers the most important content.

But I don’t like clicking these links and then seeing the featured image again, above the headline of the post. That seems to be a popular place to put it, for most of the recent default themes. While creating my own custom child themes, it’s always one of the first things I change.

And I don’t like seeing it above posts that aren’t currently “featured” on the homepage or on other archive pages (categories, tags, month, etc).

Most of the recent WordPress default themes (twentyfourteen, twentyeleven, etc) display featured images in this way on default, with few if any controls built in allowing theme users to customize it.

As I’m developing my twentyfourteen child theme, I thought I’d share with you how I removed featured images from the eight content- templates.

The nine files you will want to re-create by duplicating them from the parent them into your child theme are:

content.php
content-aside.php
content-audio.php
content-gallery.php
content-image.php
content-link.php
content-quote.php
content-video.php

These files are the content templates, they control the structure of how posts are displayed, depending on their post format.

In the TwentyFourteen theme, each and every one of these post formats include the featured image before the headline of the post. I liked this behavior in the default theme TwentyTen, but that was back when the technique was new to me and it was at the very top of the page.

To prevent the featured image from displaying on these post formats, remove the following code from the second line of code of each of the files, right after the opening article tag.

<?php twentyfourteen_post_thumbnail(); ?>

That’s it! So simple, it makes you wonder why the default themes don’t come with a checkbox allowing one to quickly disable featured images from appearing above headlines in the single post page and archive pages.

How much do you hate featured image overuse? Tell me in the comments.

Reducing duplicity in the homepage loop while using the ephemera widget on the twentyfourteen child theme

-OR-

Say something once, why say it again?

Step one toward a better WordPress twentyfourteen child theme

Today, I launched my new child theme for WordPress’ new default theme, twentyfourteen, which will be a running work in progress on this site likely for the next few weeks leading to the official initial release of it in the WordPress theme repository.

As I’m developing it, I will post here about new features and ways I’ve chosen to craft the theme to my liking.

Some of the first adjustments I have made include tweaking the width of the theme to display better at full width on my 17″ laptop screen and adjust the themes colors to a custom palette. But I’m not finished in these departments, so I will wait until I am completely satisfied before I elaborate more here.

Today’s adjustment focuses on adjusting the main loop of the theme so that it doesn’t repeat content found in the ephemera widget floated to the right of the main content. The ephemera widget has come with the last few incarnations of the default theme, and allows the user to display posts of a certain post format of their choosing … However, that content, on default, is also displayed in the main loop, which means the day you post a new post in that format, identical content will run side-by-side. It’s a shame that a solution to this problem isn’t offered in the default theme twentyfourteen, but below, find the solution I implemented by creating a functions.php file for my new child theme and adding the following code to it (between the opening and closing PHP tags, of course):



function exclude_post_formats( $query ) {
	if ( $query->is_main_query() && $query->is_home() ) {
		$tax_query = array(
			array(
				'taxonomy' => 'post_format',
				'field' => 'slug',
				'terms' => array(
					'post-format-link'
				),
				'operator' => 'NOT IN',
			)
		);
		$query->set( 'tax_query', $tax_query );
	}
}

add_action( 'pre_get_posts', 'exclude_post_formats' );

This function will exclude posts with the link post format from the homepage loop query, because I prefer to have those posts display in the ephemera widget floated to the right of the main content, and the duplicity is irksome. I learned how to do this by reading the article Modifying the default WordPress loop to exclude specific post formats by Jeffrey Barke.

Initially, I tried doing this by duplicating the index.php file from twentyfourteen, and then using an advanced taxonomy query to tell the homepage loop what to display by telling it what NOT to display (as suggested by Roy Scribner and Otto); but this didn’t work, because the twentyfourteen theme takes a different approach to doing this via the pre_get_posts action in the file inc/featured-content.php … so the above function that runs along side it works great in my new twentyfourteen child theme, and filters out the post-format-link posts while keeping the other query features of the parent twentyfourteen theme in tact.

Will it make me a sammich? Thoughts on ‘no-content’ marketing

Recently I’ve been exploring the idea of no-content marketing, which is what I think will come after the content marketing gold rush — when abundance becomes surfeit.

So whatever marketing content you produce had better be useful.

Longer term, though, even that won’t be enough. Much marketing will need to stop being content at all.

— Spencer Critchley, “Make Yourself Useful: Create Marketing People Actually Want,” Huffington Post, Dec. 6, 2013.

 

Content marketing is all the rage right now. But in the information age — when the answer is just a search away — can those who provide the answers become the brands we love and trust?

Or is it just more bullshit?

As people, can we stop loving and trusting brands? As brands, can we stop trying to make them?