It’s very easy to customize your byline if you are using the thesis theme for wordpress. In case you didn’t know, the byline area is the one that says something like Posted by Author on DATE, just before your post title.
In this tutorial I’m going to show you how to create a custom byline that differs if it’s displayed on the front page or not. In particular I want to show the date only on the homepage, and not on the single article page.
It’s very simple to do this.
First, you need to remove the Show published-on date in post byline and Show author name in page byline options under byline options in your thesis configuration options area.
Second, you need to add a custom action on your custom_functions.php file. You can edit this file from the custom file editor inside wordpress if you want, but be sure you have FTP access before doing this, just in case you do something wrong. The following is the code you should put on your custom_functions file:
function add_to_byline() {
if (is_front_page()) {
echo ' on <abbr title="' . get_the_time('Y-m-d') . '">' . get_the_time(get_option('date_format')) . '</abbr>';
}
}
add_action('thesis_hook_byline_item', 'add_to_byline', '99');
And Voila! You are now displaying the date only in the front page.
I got asked this question and I thought it would be useful if I created an article for everyone.
Disclaimer: I got this code working thanks to some articles I read on the internet, which I can’t remember the name.
In this article, I’ll explain how to create those beautiful social bookmarking icons for your thesis theme. [...]
A big welcome to thesis coupon. We have created this website to offer the best thesis coupons available to you.
Our offer is simple:
You buy your license of thesis from our affiliate link.
You send us your order detail by using the claim your coupon page.
We send you $10 back when you buy the personal option, and [...]