This question was asked on the forums recently which i’ll answer with one solution i think is the best:
I’m using the Twenty Fourteen theme and think it’s stupid to show full posts in the Archives section. I want just the titles to be displayed for easier navigation. Even removing the dates would be nice. (I’ve already done so for individual posts but the Archives section still says May 2014.) This is minor though. The main thing I’d like to know is how to only display the title.
I’ve looked at the archive.php file (included below) but don’t know php and have no idea what to do. The advice I’ve found using Google is outdated and the code samples don’t match mine. Please o’ gracious lords of the internet, tell me what needs to be changed so my site can suck a little less.
Here’s what my solution produces:
1. Create a child theme for Twenty Fourteen
The first step is to create a child theme which we’ll use to copy over files from the parent them in order to avoid losing the changes when the parent theme updates.
2. Copy Files From Parent to Child Theme
Copy over the content.php file and the category.php file if you only want to display post entry titles on all category archives.
If you also want to display post titles only on other archives like author and tag archive pages, copy over those files as well.
3. Modify File Names & Code
Rename the content.php file to content-titles.php and then remove all the code in the file leaving only whats needed to display your entry titles. Here’s the result showing the screenshot from my local installation, followed by the code.
And here’s the code for your content-titles.php file.
4. Edit Get Template Part Name In Files
The final step is to open your category.php file which you copied over to your child theme and find this line of code:
get_template_part( 'content', get_post_format() );
And change it to this:
get_template_part( 'content', 'titles' );
You can read more about get_template_part on the WordPress.org Codex however what it basically does is include the file named content-titles.php in the file you include it in which in this case is the category.php archive page template.
Titles Only On Other Archives
Simply change the get_template_part() name to in any other archive type files you copy over to your child theme and they will also only display the post entry titles.
get_template_part( 'content', 'titles' );
Got a better solution for showing post titles only on archive pages in the Twenty Fourteen theme?
If you’re interested in learning more about why Genesis is the most popular premium theme framework, click the link below in the related posts to see how its done in StudioPress themes. Far cleaner, easier and faster in my opinion.
Was This Tutorial Helpful?