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?

Year in Review: Google+ video edition

Happy New Year! This year was filled with many memories, and I probably took more photos this year than ever before.

Google made this movie automatically from photos I’ve uploaded to Google+ Photo Albums and added it to my Google+ photos, with a private setting. Auto awesome! Good thing I didn’t make it public, it contained photos of people who aren’t family and shouldn’t be in the video! So I edited it in Adobe Premiere and uploaded the result to YouTube, after taking out the annoying music, too.

In dependence

Jeremy aka Adactio has a great all-inclusive article about the recent web posts amongst independent online publishers (bloggers?) who are pondering the future of the medium. Namely Jason Kottke who said the blog is dead.

http://adactio.com/journal/6620/

For myself, looking at the year-over-year data for my own personal website brandonmoeller.com, even though I likely created more posts here than ever this year, my readership hasn’t significantly increased.

But surely, if this really mattered to me, I would have strived more often to write content that would appeal to a larger audience … For the most part, I’ve been busier with more important things. Read: Baby.

But I don’t care if the audience is in the silos … More and more I find myself not inclined to share my posts from this outlet in the social media circus that I consume more of than participate in. I enjoy the control over my content that the other sites will never allow; my key target audiences of relatives and my own selfish self are happy … Who cares?