<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>byline &#8211; Thesis Docs</title>
	<atom:link href="https://diythemes.com/thesis/rtfm/tag/byline/feed/" rel="self" type="application/rss+xml" />
	<link>https://diythemes.com/thesis/rtfm</link>
	<description>Documentation, How-tos, and Best Practices for the Thesis WordPress Theme System</description>
	<lastBuildDate>Wed, 28 Aug 2019 17:32:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>
	<item>
		<title>Custom Teaser Byline</title>
		<link>https://diythemes.com/thesis/rtfm/custom-teaser-byline/</link>
		
		<dc:creator><![CDATA[Shelley]]></dc:creator>
		<pubDate>Mon, 12 Oct 2009 15:10:52 +0000</pubDate>
				<category><![CDATA[Thesis 1 Documentation]]></category>
		<category><![CDATA[author]]></category>
		<category><![CDATA[author name]]></category>
		<category><![CDATA[byline]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[edit post link]]></category>
		<category><![CDATA[primary category]]></category>
		<category><![CDATA[teasers]]></category>
		<guid isPermaLink="false">https://diythemes.com/answers/?p=524</guid>

					<description><![CDATA[<ul>
<li>Display Author, Date, and Category</li>
<li>Display Date, Edit Link, and Category (on Separate Lines)</li>
</ul>]]></description>
										<content:encoded><![CDATA[<p class="alert">The code in this article is compatible only with version 1.7 or higher of Thesis.</p>
<h3 id="auth_date_cat">Display Author, Date, and Category <a href="#auth_date_cat" title="Link to this section">∞</a></h3>
<p>This custom code will give your teasers a byline in this format:</p>
<p><code>by (author) on (date) in (category)</code></p>
<p>First, uncheck the <em>author name</em>, <em>date</em>, and <em>primary category</em> elements under <strong>Design Options &gt; Teasers &gt; Teaser Display Options</strong> to avoid duplication.</p>
<p>Then, place this code in <code>custom_functions.php</code>:</p>
<pre class="php">
function my_teaser_byline() {
	global $thesis_design;
	$date_formats = thesis_get_date_formats();
	$use_format = ($thesis_design-&gt;teasers['date']['format'] == 'custom') ? $thesis_design-&gt;teasers['date']['custom'] : $date_formats[$thesis_design-&gt;teasers['date']['format']];
	echo '&lt;span class=&quot;teaser_author&quot;&gt;';
	thesis_author();
	echo '&lt;/span&gt;';
	echo &quot;\n&quot;;
	echo '&lt;abbr class=&quot;teaser_date published&quot; title=&quot;' . get_the_time('Y-m-d') . '&quot;&gt;on ' . get_the_time($use_format) . '&lt;/abbr&gt;' . &quot;\n&quot;;
	$categories = get_the_category();
	echo '&lt;a class=&quot;teaser_category&quot; href=&quot;' . get_category_link($categories[0]-&gt;cat_ID) . '&quot;&gt;in ' . $categories[0]-&gt;cat_name . '&lt;/a&gt;' . &quot;\n&quot;;
}

add_action('thesis_hook_after_teaser_headline', 'my_teaser_byline');
</pre>
<h3 id="date_edit_cat">Display Date, Edit Link, and Category (on Separate Lines) <a href="#date_edit_cat" title="Link to this section">∞</a></h3>
<p>This version pulls together the date, edit link, and category, then adds paragraph tags to the category function to put it on a line by itself.</p>
<p>First, uncheck the <em>date</em>, <em>edit post link</em>, and <em>primary category</em> elements under <strong>Design Options &gt; Teasers &gt; Teaser Display Options</strong> to avoid duplication.</p>
<p>Then, place this code in <code>custom_functions.php</code>:</p>
<pre class="php">
function my_teaser_byline() {
	global $thesis_design;
	$date_formats = thesis_get_date_formats();
	$use_format = ($thesis_design-&gt;teasers['date']['format'] == 'custom') ? $thesis_design-&gt;teasers['date']['custom'] : $date_formats[$thesis_design-&gt;teasers['date']['format']];
	echo '&lt;abbr class=&quot;teaser_date published&quot; title=&quot;' . get_the_time('Y-m-d') . '&quot;&gt;' . get_the_time($use_format) . '&lt;/abbr&gt;' . &quot;\n&quot;;
	edit_post_link(__('edit', 'thesis'), '&lt;span class=&quot;edit_post&quot;&gt;[', ']&lt;/span&gt;');
	echo &quot;\n&quot;;
	$categories = get_the_category();
	echo '&lt;p&gt;&lt;a class=&quot;teaser_category&quot; href=&quot;' . get_category_link($categories[0]-&gt;cat_ID) . '&quot;&gt;' . $categories[0]-&gt;cat_name . '&lt;/a&gt;&lt;/p&gt;' . &quot;\n&quot;;
}

add_action('thesis_hook_after_teaser_headline', 'my_teaser_byline');
</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Style the Post Byline</title>
		<link>https://diythemes.com/thesis/rtfm/style-post-byline/</link>
		
		<dc:creator><![CDATA[Shelley]]></dc:creator>
		<pubDate>Wed, 03 Jun 2009 15:11:08 +0000</pubDate>
				<category><![CDATA[Thesis 1 Documentation]]></category>
		<category><![CDATA[abbr]]></category>
		<category><![CDATA[byline]]></category>
		<category><![CDATA[cursor]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[headline]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[posted in]]></category>
		<guid isPermaLink="false">https://diythemes.com/answers/?p=348</guid>

					<description><![CDATA[<ul>
<li>Style Author Name</li>
<li>Style Published On Date</li>
<li>Style Comments and Categories Links</li>
<li>Remove Italics and Uppercase Formatting</li>
</ul>]]></description>
										<content:encoded><![CDATA[<h3 id="author_name">Style Author Name <a href="#author_name" title="Link to this section">∞</a></h3>
<p>Place this code in <code>custom.css</code>, and change to suit your requirements:</p>
<pre class="css">
/* Unlinked author name */
.custom span.author {
   color: #888888;
}

/* Linked author name */
.custom span.author a {
   color: #888888;
}
</pre>
<h3 id="published_date">Style Published On Date <a href="#published_date" title="Link to this section">∞</a></h3>
<p>Place this code in <code>custom.css</code>, and change to suit your requirements:</p>
<pre class="css">
.custom abbr.published {
   font-weight:bold;
   cursor: default;
}
</pre>
<h3 id="comments_categories">Style Comments and Categories Links <a href="#comments_categories" title="Link to this section">∞</a></h3>
<p>Place this code in <code>custom.css</code>, and change to suit your requirements:</p>
<pre class="css">
.custom .headline_meta a {
   color: #888888;
}
</pre>
<p><em>Note that this style will also be applied to the <em>linked</em> author names, unless you&#8217;re also using the code in <a href="#auth_name" title="Style Author Name">Style Author Name</a>, above.</em></p>
<h3 id="italics_uppercase">Remove Italics and Uppercase Formatting <a href="#italics_uppercase" title="Link to this section">∞</a></h3>
<p>Place this code in <code>custom.css</code>:</p>
<pre class="css">
/* Remove Italics */
.custom .headline_meta {
   font-style: normal;
}
/* Remove Uppercase */
.custom .headline_meta span,
 .custom .headline_meta abbr {
   text-transform: none;
}
</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Customize the Post Byline</title>
		<link>https://diythemes.com/thesis/rtfm/customize-post-byline/</link>
		
		<dc:creator><![CDATA[Shelley]]></dc:creator>
		<pubDate>Tue, 07 Apr 2009 02:01:23 +0000</pubDate>
				<category><![CDATA[Thesis 1 Documentation]]></category>
		<category><![CDATA[archives]]></category>
		<category><![CDATA[avatar]]></category>
		<category><![CDATA[byline]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[headline]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[posted in]]></category>
		<guid isPermaLink="false">https://diythemes.com/answers/?p=22</guid>

					<description><![CDATA[<ul><li>Hide Number of Comments</li>
<li>Hide Post Categories</li>
<li>Move Post Categories to First Line</li>
<li>Move Entire Byline to After Post</li>
<li>Add "Posted In" Before Category</li>
<li>Add Time Stamp After Published On Date</li>
<li>Move Date to Before Title</li>
<li>Display an Avatar Next to Byline</li>
<ul><li>Avatars for Multiple Authors</li></ul>
<li>Hide Byline on Archives &#038; Category Pages Only</li>
</ul>]]></description>
										<content:encoded><![CDATA[<p>Thesis offers several options for controlling the information which displays in your byline. To view and/or change these options, navigate to <strong>Design Options</strong>, then look under <em>Display Options : Bylines</em>.</p>
<p>In some cases, you may need to use custom functions to achieve the results you want. Here are some examples of how to make changes to the byline, using both the standard options and custom functions.</p>
<h2 id="hide_comm">Hide Number of Comments <a href="#hide_comm" title="Link to this section">∞</a></h2>
<p>In the <strong>Design Options</strong> panel, under <em>Display Options : Bylines</em>, uncheck the &#8220;Show number of comments in byline&#8221; option.</p>
<h2 id="hide_cat">Hide Post Categories <a href="#hide_cat" title="Link to this section">∞</a></h2>
<p>In the <strong>Design Options</strong> panel, under <em>Display Options : Bylines</em>, uncheck the &#8220;Show post categories&#8221; option.</p>
<h2 id="move_cat">Move Post Categories to First Line <a href="#move_cat" title="Link to this section">∞</a></h2>
<p>In the <strong>Design Options</strong> panel, under <em>Display Options : Bylines</em>, uncheck the &#8220;Show post categories&#8221; option. Then, place this code in <code>custom_functions.php</code>:</p>
<pre>
function add_to_byline() {
  if (!is_page())
    echo ' in &lt;span&gt;' . get_the_category_list(',') . '&lt;/span&gt;';
}

add_action('thesis_hook_byline_item', 'add_to_byline', '99');
</pre>
<h2 id="after_post">Move Entire Byline to After Post <a href="#after_post" title="Link to this section">∞</a></h2>
<p>In the <strong>Design Options</strong> panel, under <em>Display Options : Bylines</em>, uncheck <strong>all</strong> options. Then, place this code in <code>custom_functions.php</code>:</p>
<pre>
function custom_byline() { ?&gt;

&lt;p class=&quot;headline_meta&quot;&gt;&lt;?php thesis_author(); ?&gt; on &lt;abbr class=&quot;published&quot; title=&quot;&lt;?php echo get_the_time('Y-m-d'); ?&gt;&quot;&gt;&lt;?php echo get_the_time(get_option('date_format')); ?&gt;&lt;/abbr&gt;
 &amp;middot; &lt;span&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;#comments&quot; rel=&quot;nofollow&quot;&gt;
 &lt;?php comments_number(__('0 comments', 'thesis'), __('1 comment', 'thesis'), __('% comments', 'thesis')); ?&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;headline_meta&quot;&gt;&lt;?php the_tags('tagged as &lt;span&gt;', ', ', '&lt;/span&gt;'); ?&gt;
 in &lt;span&gt;&lt;?php echo get_the_category_list(','); ?&gt;&lt;/span&gt;&lt;/p&gt;

&lt;?php }

add_action('thesis_hook_after_post', 'custom_byline');
</pre>
<h2 id="posted_in">Add &#8220;Posted In&#8221; Before Category <a href="#posted_in" title="Link to this section">∞</a></h2>
<p>In the <strong>Design Options</strong> panel, under <em>Display Options : Bylines</em>, uncheck the &#8220;Show post categories&#8221; option. Then, place this code in <code>custom_functions.php</code>:</p>
<pre>
function add_to_byline() { ?&gt;
    &lt;/p&gt;&lt;p class=&quot;headline_meta&quot;&gt;&lt;?php echo __('Posted in:', 'thesis') . ' &lt;span&gt;' . get_the_category_list(',') . '&lt;/span&gt;'; ?&gt;
&lt;?php }
add_action('thesis_hook_byline_item', 'add_to_byline', '99');
</pre>
<h2 id="time_stamp">Add Time Stamp After Published On Date <a href="#time_stamp" title="Link to this section">∞</a></h2>
<p>In the <strong>Design Options</strong> panel, under <em>Display Options : Bylines</em>, uncheck the “Show published-on date in post byline” and &#8220;Show number of comments in byline&#8221; options. Then, place this code in <code>custom_functions.php</code>:</p>
<pre>
function custom_byline() {
  if (!is_page()) { ?&gt;
  &lt;p class=&quot;headline_meta&quot;&gt;&lt;abbr class=&quot;published&quot; title=&quot;&lt;?php echo get_the_time('Y-m-d H:i'); ?&gt;&quot;&gt;&lt;?php echo get_the_time(get_option('date_format')); ?&gt; &lt;?php the_time('G:i a'); ?&gt;&lt;/abbr&gt;
 &amp;middot; &lt;span&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;#comments&quot; rel=&quot;nofollow&quot;&gt;
 &lt;?php comments_number(__('0 comments', 'thesis'), __('1 comment', 'thesis'), __('% comments', 'thesis')); ?&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;?php }
}

add_action('thesis_hook_after_headline', 'custom_byline');
</pre>
<p>Note: This code excludes Pages from having the custom byline applied; you will need to remove the extra conditional code if you wish to use it on Pages as well.</p>
<h2 id="move_date">Move Date to Before Title <a href="#move_date" title="Link to this section">∞</a></h2>
<p>In the <strong>Design Options</strong> panel, under <em>Display Options : Bylines</em>, uncheck the &#8220;Show published-on date in post byline&#8221; and &#8220;Show published-on date in page byline&#8221; options. Then, place this code in <code>custom_functions.php</code>:</p>
<pre>
function add_to_byline() { ?&gt;
   &lt;p class=&quot;headline_meta&quot;&gt;&lt;?php echo (''). ' &lt;span&gt;' .get_the_time('F j, Y') . '&lt;/span&gt;&lt;/p&gt;'; ?&gt;
&lt;?php }

add_action('thesis_hook_before_headline', 'add_to_byline', '1');
</pre>
<h2 id="avatar">Display an Avatar Next to Byline <a href="#avatar" title="Link to this section">∞</a></h2>
<p>Place this code in <code>custom_functions.php</code> (replacing <code>http://www.example.com/path/to/your/images/avatar.gif</code> with the URL to your avatar):</p>
<pre>
/* byline avatar */
function byline_avatar() {
echo '&lt;img class=&quot;byline_avatar&quot; src=&quot;http://www.example.com/path/to/your/images/avatar.gif&quot; /&gt;';
}

add_action('thesis_hook_before_headline', 'byline_avatar');
</pre>
<p>Then, place this code in <code>custom.css</code> (adjust margin value as desired):</p>
<pre>
/*avatar styles*/
.custom .byline_avatar {
   float: left;
   margin-right: 0.5em;
   margin-bottom: 0.5em;
}
</pre>
<h3 id="avatar_ma">Avatars for Multiple Authors <a href="#avatar_ma" title="Link to this section">∞</a></h3>
<p>Place this code in <code>custom_functions.php</code> (replace <code>50</code> with the desired pixel size):</p>
<pre>
/* byline avatars */
function byline_avatars() {
  echo get_avatar(get_the_author_id(), 50);
}

add_action('thesis_hook_before_headline', 'byline_avatars');
</pre>
<p>Then, place this code in <code>custom.css</code> (adjust margin value as desired):</p>
<pre>
/*avatar styles*/
.custom .avatar {
   float: left;
   margin-right: 0.5em;
   margin-bottom: 0.5em;
}
</pre>
<h2 id="arch_cat">Hide Byline on Archives &#038; Category Pages Only <a href="#arch_cat" title="Link to this section">∞</a></h2>
<p>Place this code in <code>custom_functions.php</code>:</p>
<pre>
function custom_body_class($classes) {
 if (is_archive() || is_category()) {
    $classes[] .= 'hide_meta';
 }
    return $classes;
}
add_filter('thesis_body_classes', 'custom_body_class');
</pre>
<p>Then, place this code in <code>custom.css</code>:</p>
<pre>
/* hide meta */
.custom.hide-meta .headline_meta {display:none;}
</pre>
<h2>Related Resources:</h2>
<ul>
<li><code>thesis_hook_byline_item</code></li>
<li><a href="https://codex.wordpress.org/Conditional_Tags">WordPress conditional tags</a></li>
<li><a href="https://www.php.net/manual/en/function.date.php">Date formats reference &#8211; PHP Manual</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
