From IThemes Codex
Revision as of 14:55, February 21, 2012 by Sridhar (Talk | contribs)
Jump to: navigation, search

Kepler Demo Site


About the content and using excerpts

By default full content gets shown in Kepler listing pages like the Posts page.

This is defined via

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

in child theme's content.php.

To break the content and have "Read More →" appear below each post similar to the demo Posts page, use more tag built in WordPress. i.e., by inserting
wherever you want the post to split up when in HTML view of the post editor.

To show excerpts instead of full content (or partial content using more tag)

If your site already has a lot of posts it will be a tedious process to manually insert the more tag for each post.

The steps below helps in automatically adding "Read More →" to existing posts without having to update each individually.

1. Replace

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


<?php the_excerpt(); ?>

in content.php.

2. Add the following at the end of child theme's functions.php:

function new_excerpt_more($more) {
	global $post;
	return '<div class="readmore"><a href="'. get_permalink($post->ID) . '">Read More →</a></div>';
add_filter('excerpt_more', 'new_excerpt_more');
Screenshot showing a Posts page when excerpts are being used

Note: Formatting i.e., HTML code like paragraph, strong tags will get stripped in auto excerpts. If you would like formatting to retain, use manual excerpts.

How to replace circular date with regular text date


Edit child theme's content.php.


<?php if ( function_exists( 'builder_child_posted_on') && ( builder_get_theme_setting( 'disable_builder_child_posted_on' ) != true ) ) : ?>
								<?php echo builder_child_posted_on(); ?>
							<?php endif; ?>


<div class="entry-meta">
								<?php printf( __( 'By %s', 'it-l10n-Builder' ), '<span class="author">' . builder_get_author_link() . '</span>' ); ?>
								<?php do_action( 'builder_comments_popup_link', '<span class="comments">· ', '</span>', __( 'Comments %s', 'it-l10n-Builder' ), __( '(0)', 'it-l10n-Builder' ), __( '(1)', 'it-l10n-Builder' ), __( '(%)', 'it-l10n-Builder' ) ); ?>
								on <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>

Item 3

Item 4

Personal tools
iThemes Codex
Codex Navigation