BuilderChild-Adept

From IThemes Codex
(Difference between revisions)
Jump to: navigation, search
m (How to make text appear for site title)
(Added == How to display featured image in single post pages ==)
 
Line 55: Line 55:
 
'''2.''' Repeat the above in <code>content-single.php</code>.
 
'''2.''' Repeat the above in <code>content-single.php</code>.
  
== Item 4 ==
+
== How to display featured image in single post pages ==
 +
 
 +
[[File:Screen Shot 2013-01-27 at 12.28.03 PM.png|831px|thumb|none|Before]]
 +
 
 +
[[File:Screen Shot 2013-01-27 at 12.27.29 PM.png|800px|thumb|none|After]]
 +
 
 +
'''1.''' Copy wp-content/themes/Builder/extensions/post-teasers-left/images/no-feature-image.jpg to wp-content/themes/BuilderChild-Adept/images
 +
 
 +
'''2.''' Edit child theme's <code>content-single.php</code>.
 +
 
 +
Above
 +
 
 +
<pre class="brush:php;">
 +
<?php the_content( __( 'Read More&rarr;', 'it-l10n-BuilderChild-Adept' ) ); ?>
 +
</pre>
 +
 
 +
paste
 +
 
 +
<pre class="brush:php;">
 +
<?php if ( has_post_thumbnail() ) : ?>
 +
<a href="<?php the_permalink(); ?>" class="teasers-thumb-wrapper">
 +
<?php the_post_thumbnail( 'it-teaser-thumb', array( 'class' => 'alignleft teaser-thumb' ) ); ?>
 +
</a>
 +
<?php else : ?>
 +
<?php edit_post_link( '<img width="150" height="200" src="' . get_bloginfo( 'stylesheet_directory' ) . '/images/no-feature-image.jpg" class="alignleft teaser-thumb no-thumb" />', '<div class="teaser-thumb-wrapper">', '</div>' ) ; ?>
 +
<?php endif; ?>
 +
</pre>

Latest revision as of 02:02, January 27, 2013

Builder child theme Adept Live Demo

Contents

How to make text appear for site title

Adept's style.css sets a image (images/logo.png) as background for site title (.builder-module-header .site-title). If you would like to have your site's title appear instead of the image, add the following at the end of child theme's style.css:

.builder-module-header .site-title {
    background: none;
    text-indent: 0;
    width: auto;
    height: auto;
    font-size: 2.3em;
    margin-bottom: 10px;
}

.site-tagline {
    margin-left: 5px;
}

Sample before and after:

Before
After

Font used in demo site's header image

The font used in Adept demo site's header, Liberator can be downloaded from here.

How to add show number of comments below post title

Before
After

1. Edit child theme's content.php.

Add

<?php edit_post_link( 'Edit', ' <span class="">· ', '</span>' ); ?>
								<?php do_action( 'builder_comments_popup_link', '<span class="comments right">', '</span>', __( 'Comments %s', 'it-l10n-BuilderChild-Adept' ), __( '(0)', 'it-l10n-BuilderChild-Adept' ), __( '(1)', 'it-l10n-BuilderChild-Adept' ), __( '(%)', 'it-l10n-BuilderChild-Adept' ) ); ?>

below

<?php printf( __( 'by %s', 'it-l10n-BuilderChild-Adept' ), '<span class="author">' . builder_get_author_link() . '</span>' ); ?>

The first line in the code being added causes a Edit link to appear. If you do not wish to have it, do not add that line.

2. Repeat the above in content-single.php.

How to display featured image in single post pages

Before
After

1. Copy wp-content/themes/Builder/extensions/post-teasers-left/images/no-feature-image.jpg to wp-content/themes/BuilderChild-Adept/images

2. Edit child theme's content-single.php.

Above

<?php the_content( __( 'Read More→', 'it-l10n-BuilderChild-Adept' ) ); ?>

paste

<?php if ( has_post_thumbnail() ) : ?>
	<a href="<?php the_permalink(); ?>" class="teasers-thumb-wrapper">
		<?php the_post_thumbnail( 'it-teaser-thumb', array( 'class' => 'alignleft teaser-thumb' ) ); ?>
	</a>
<?php else : ?>
	<?php edit_post_link( '<img width="150" height="200" src="' . get_bloginfo( 'stylesheet_directory' ) . '/images/no-feature-image.jpg" class="alignleft teaser-thumb no-thumb" />', '<div class="teaser-thumb-wrapper">', '</div>' ) ; ?>
<?php endif; ?>
Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox