BuilderChild-Classen

(Difference between revisions)
Jump to: navigation, search
m
(How to replace author and date info in left metabox with a text format)
Line 1: Line 1:
= How to replace author and date info in left metabox with a text format =
+
= How to replace left metabox having author, posting date, categories, comments with text =
  
 
<gallery widths=200px caption="Before and After">
 
<gallery widths=200px caption="Before and After">
File:Classen-date-mod-before.png
+
File:Classen-metainfo-before.png
File:Classen-date-mod-after.png
+
File:Classen-metainfo-after.png
 
</gallery>
 
</gallery>
  
Line 33: Line 33:
 
in each file.
 
in each file.
  
'''2.''' Add the following at the end of your theme's style.css:
+
'''2.''' Add
 +
 
 +
<pre class="brush:php;">
 +
<div class="meta-bottom clearfix">
 +
<span class="categories"><?php printf( __( 'Categories: %s', 'it-l10n-BuilderChild-Classen' ), get_the_category_list( '<br /> ' ) ); ?></span>
 +
</div>
 +
</pre>
 +
 
 +
below
 +
 
 +
<pre class="brush:php;">
 +
<div class="post-content">
 +
<?php the_content( __( 'Read More&rarr;', 'it-l10n-BuilderChild-Classen' ) ); ?>
 +
</div>
 +
</pre>
 +
 
 +
'''3.''' Add the following at the end of your theme's style.css:
  
 
<pre class="brush:css;">
 
<pre class="brush:css;">
Line 45: Line 61:
 
color: #9ca071;
 
color: #9ca071;
 
margin-top: 10px;
 
margin-top: 10px;
 +
}
 +
 +
.post .post-meta a {
 +
    color: #537A8A;
 +
}
 +
 +
.meta-bottom .categories {
 +
    color: #9CA071;
 
}
 
}
 
</pre>
 
</pre>

Revision as of 04:46, March 15, 2011

Contents

How to replace left metabox having author, posting date, categories, comments with text

1. Edit theme's index.php, single.php and archive.php.

Add

						<div class="post-meta">
							<?php printf( __( 'By %s', 'it-l10n-BuilderChild-Classen' ), '<span class="meta-author">' . builder_get_author_link() . '</span>' ); ?>
							<?php do_action( 'builder_comments_popup_link', '<span class="meta-comments">· ', '</span>', __( 'Comments %s', 'it-l10n-BuilderChild-Classen' ), __( '(0)', 'it-l10n-BuilderChild-Classen' ), __( '(1)', 'it-l10n-BuilderChild-Classen' ), __( '(%)', 'it-l10n-BuilderChild-Classen' ) ); ?>
						</div>
							
						<div class="date">
							<span class="weekday"><?php the_time( 'l' ); ?><span class="weekday-comma">,</span></span>
							<span class="month"><?php the_time( 'F' ); ?></span>
							<span class="day"><?php the_time( 'j' ); ?><span class="day-suffix"><?php the_time( 'S' ); ?></span><span class="day-comma">,</span></span>
							<span class="year"><?php the_time( 'Y' ); ?></span>
						</div>

below

<div class="post-title">
							<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
						</div>

in each file.

2. Add

<div class="meta-bottom clearfix">
							<span class="categories"><?php printf( __( 'Categories: %s', 'it-l10n-BuilderChild-Classen' ), get_the_category_list( '<br /> ' ) ); ?></span>
						</div>

below

<div class="post-content">
							<?php the_content( __( 'Read More→', 'it-l10n-BuilderChild-Classen' ) ); ?>
						</div>

3. Add the following at the end of your theme's style.css:

.leftmetabox { 
    display: none; 
}

.post .post-meta, .date {
	letter-spacing: normal;
	font-size: 1em;
	color: #9ca071;
	margin-top: 10px;
}

.post .post-meta a {
    color: #537A8A;
}

.meta-bottom .categories {
    color: #9CA071;
}

Item 2

Item 3

Item 4

Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox