Click here to Skip to main content
13,868,223 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


3 bookmarked
Posted 3 Aug 2015
Licenced CPOL

How to Add Excerpts to your WordPress Blog Homepage in a TwentyThirteen Theme and Not Break the Codeproject Importer

, 3 Aug 2015
Rate this:
Please Sign up or sign in to vote.
Adding excerpts to your WordPress blog homepage in a twentythirteen theme without breaking the CodeProject importer

As you may know, CodeProject has a thing called Technical blogs which lets you publish your post on their site too, thus widening the range of potential readers.

Thanks to a great plugin by hjgode, you can automatically import your posts.

However, recently I wanted just to show excerpts of the posts on my blog homepage and in the archives. The problem was that that stopped the importer from collecting the posts that are marked with the codeproject category because the posts were too short according to their rules (1000 words minimum).

I solved this in my TwentyThirteen theme by making slight changes in content.php (around line 33), which by default looks like this:

<?php if ( is_search() ) : // Only display Excerpts for Search ?>

This line displays excerpts only on a search page, and to show excerpts on homepage, I did:

<?php if ( is_search() || is_home() ) :  ?>

You just have to make sure that you don’t include the:


and you’re all set.

True, you could further optimize this in a way that you would show excerpts for all other categories except “codeproject”.

The post How to add excerpts to your WordPress blog homepage in a TwentyThirteen theme and not break the Codeproject importer appeared first on Nikola Brežnjak blog.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Nikola Breznjak
Software Developer (Senior)
Croatia Croatia
I’m an engineer at heart and a jack of all trades kind of guy.

For those who care about titles, I hold a masters degree in computing from FER (and a black belt in karate, but that’s another story…).

During the last years, worked in a betting software industry where I made use of my knowledge in areas ranging from full-stack (web & desktop) development to game development through Linux and database administration and use of various languages (C#, PHP, JavaScript to name just a few).

Currently, I’m a senior software engineer at TelTech, where we make innovative communications apps, and I <3 it.

Lately, I’m very passionate about Ionic framework and am currently in the top 3 answerers on StackOverflow in Ionic framework. I wrote a book about Ionic framework which you can get for free on Leanpub: Ionic framework – step by step from idea through prototyping to the app stores.

Other technical writing:

+ wrote a book Getting MEAN with MEMEs
was a technical reviewer for a book Deploying Node published by Packt
was a technical reviewer for a book Getting started with Ionic published by Packt
After writing 300 posts, this is why I think you should start blogging too

Come and see what I write about on my blog.

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web06 | 2.8.190214.1 | Last Updated 4 Aug 2015
Article Copyright 2015 by Nikola Breznjak
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid