Difference between revisions of "BuilderChild-Classen"

From iThemes Codex
Jump to: navigation, search
(How to replace author and date info in left metabox with a text format)
m (How to remove the left box and put the Date, Author etc at the bottom of the post in text)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
= How to replace left metabox having author, posting date, categories, comments with text =
+
= How to remove the left box and put the Date, Author etc at the bottom of the post in text =
  
<gallery widths=200px caption="Before and After">
+
Edit child theme's index.php, archive.php and single.php. Move meta info to your desired location in these template files.
File:Classen-metainfo-before.png
 
File:Classen-metainfo-after.png
 
</gallery>
 
  
'''1.''' Edit theme's index.php, single.php and archive.php.
+
[http://cl.ly/1w1l1j2d0v1M2B3e3D1y Sample modified index.php]
  
Add
+
Edit child theme's style.css to set display of ".leftmetabox" to none.
<pre class="brush:php;">
+
 
<div class="post-meta">
+
[http://d.pr/LaNq Sample CSS added at end of style.css]
<?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">&middot; ', '</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>
 
</pre>
 
  
below
+
The sample code above results in changing
  
<pre class="brush:php;">
+
[[File:Classen-metainfo-before2.png]]
<div class="post-title">
 
<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
 
</div>
 
</pre>
 
  
in each file.
+
to
  
'''2.''' Add
+
[[File:Classen-metainfo-after2.png]]
  
<pre class="brush:php;">
+
= How to fix distortion of featured image in single posts =
<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
+
[[File:Classen-single-featured-image-before.png|500px|thumb|none|Before]] [[File:Classen-single-featured-image-after.png|500px|thumb|none|After]]
  
<pre class="brush:php;">
+
Note: This applies to Classen 2.0.0 to 2.0.2.
<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:
+
Edit wp-content/themes/BuilderChild-Classen/single.php.
  
<pre class="brush:css;">
+
Change
.leftmetabox {
 
    display: none;
 
}
 
  
.post .post-meta, .date {
+
<pre class="brush:php;">
letter-spacing: normal;
+
<div class="front-page-thumbnail">
font-size: 1em;
+
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail( 'front-page-thumbnail' ); ?></a>
color: #9ca071;
+
</div>
margin-top: 10px;
+
</pre>
}
 
  
.post .post-meta a {
+
to
    color: #537A8A;
 
}
 
  
.meta-bottom .categories {
+
<pre class="brush:php;">
    color: #9CA071;
+
<div class="left-meta-thumbnail">
}
+
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail( 'left-meta-thumbnail' ); ?></a>
 +
</div>
 
</pre>
 
</pre>
 
= Item 2 =
 
  
 
= Item 3 =
 
= Item 3 =
  
 
= Item 4 =
 
= Item 4 =

Latest revision as of 13:37, 15 December 2011

How to remove the left box and put the Date, Author etc at the bottom of the post in text

Edit child theme's index.php, archive.php and single.php. Move meta info to your desired location in these template files.

Sample modified index.php

Edit child theme's style.css to set display of ".leftmetabox" to none.

Sample CSS added at end of style.css

The sample code above results in changing

Classen-metainfo-before2.png

to

Classen-metainfo-after2.png

How to fix distortion of featured image in single posts

Before
After

Note: This applies to Classen 2.0.0 to 2.0.2.

Edit wp-content/themes/BuilderChild-Classen/single.php.

Change

<div class="front-page-thumbnail">
								<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail( 'front-page-thumbnail' ); ?></a>
							</div>

to

<div class="left-meta-thumbnail">
								<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail( 'left-meta-thumbnail' ); ?></a>
							</div>

Item 3

Item 4