BuilderChild-Thinner

From IThemes Codex
Revision as of 20:43, July 20, 2012 by Ronald (Talk | contribs)
Jump to: navigation, search

Contents

How to get sliding images on Posts listing page

Thinner child theme includes Featured Image Slider extension which is what is being applied for the layout used by the homepage at Thinner's demo site.

Screenshot: http://ithemes.com/codex/images/8/83/Thinner-slider-extn-after.png

Featured Image Extension displays Featured Image & Post Title of first 6 posts in a custom slider and the Featured Image, Post Title & Excerpt for the remaining posts. Therefore you should edit the posts whose featured images you would like to be displayed in the slider and add featured images in all of them.

Follow these steps to get a working slider on your site's homepage:

1. Ensure that there is a separate layout to be used for homepage. Edit this layout and apply "Featured Image Slider" extension.

Slider-extn-home-layout.png

2. Add a view associating Home view with the layout set aside for homepage.

Set-view-to-layout.png

This extension can be any applied to a layout or view for listing pages like the Homepage (where posts appear by default) or Posts page or archive page or category page.

How to move wide featured image above the content in single posts to right side with content wrapping around

1. Edit lib/image-sizes.php in child theme.

Change

	add_image_size( 'singular-alternate-image', 650, 200, true );

to say,

	add_image_size( 'singular-alternate-image', 300, 200, true );

where 300 and 200 are your desired max width and height values for the featured image.

2. Add the following at the end of child theme's style.css:

.single .entry-image img {
    width: auto;
}

.single .entry-image {
	float: right;
	margin-left: 1em;
}

How to get "Read More→" below each post when using "Teasers Layout - Image Left" extension

When "Thinner Teasers Layout - Image Left" extension is used on a listing page (like Posts page or a category page), "Read More→" will only appear under those posts which have more than 60 words. i.e., If a post has more than 60 words, the first 60 words are shown and the rest will be cut off with "Read More→" automatically appearing. If a post has less than 60 words, "Read More→" will not appear by default.

If you would like to have "Read More→" appearing always below each post irrespective of length of the post follow this:

Click to enlarge

Edit wp-content/themes/BuilderChild-Thinner/extensions/post-teasers-left/functions.php.

Below <?php the_excerpt(); ?>, add

<p><a href="<?php the_permalink(); ?>" class="more-link">Read More→</a></p>

Change

function builder_teasers_left_excerpt_more( $more ) {
	global $post;
	return '...<p><a href="'. get_permalink( $post->ID ) . '" class="more-link">Read More→</a></p>';
}

to

function builder_teasers_left_excerpt_more( $more ) {
	global $post;
	return '';
}

How to modify Slider extension to show posts from a specific category

1. Copy wp-content/themes/Builder/extensions/slider to wp-content/themes/BuilderChild-Thinner/extensions/slider.

2. Edit wp-content/themes/BuilderChild-Thinner/extensions/slider/functions.php.

Change

					$args = array(
						'posts_per_page' => 6,
						'order'          => 'date',
						'meta_key'       => '_thumbnail_id'
					);

to

					$cat_id = get_cat_id('services');
					$args = array(
						'posts_per_page' => 6,
						'order'          => 'date',
						'meta_key'       => '_thumbnail_id',
						'cat'  	         => $cat_id
					);

In the above, change "services" to the slug of category from which posts should be shown in slider.

Related forum post.

Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox