Adsense Ad at the More Tag Position

Surprise your readers with a google ad after clicking the ‘read more’ link – a strategic position to catch the attention of the viewer and increase your revenue.

Advertising does not get the same attention all over your page, as this report shows, some areas are ‘hotter’ than others, and the top of your content is one of the ‘hottest’.

Many of you insert the ‘more-tag’ after a short introductionary part of your content when writing your articles – usually to keep the design of the home page clean and easy to navigate.

When  the reader clicks on the ‘continue reading’ button, this already proves that the article has so far captured his attention – and the reader is more likely to follow any targeted advertising links, particular if these are seamlessly integrated into the main post content.

Continue reading “Adsense Ad at the More Tag Position”

Custom ‘Read More’ text per Post for Twenty Ten

A sophisticated way to get a custom written ‘read more’ text added to your posts in the theme Twenty Ten (or its child themes).

The code builds on this article I posted earlier.

It uses the custom field with the key ‘cont_read’ to hold the custom text.

Add this code to functions.php of the theme:

/* Twenty Ten custom 'continue reading'
/
/ custom field ($key = 'cont_read' ) dependant 'continue reading' text
/ alchymyth 2010
*/
class Transformation_Text_Wrangler {
function reading_more($translation, $text, $domain) {

global $post;
 $cont_read = get_post_meta( $post->ID, 'cont_read', true );
 if( $cont_read ) :
 $cont_read = htmlentities($cont_read, ENT_QUOTES);
 $translations = &get_translations_for_domain( $domain );
 if ( $text == 'Continue reading <span>&rarr;</span>' ) {
 return $translations->translate( $cont_read . ' <span>&raquo;</span>' );
 }
 return $translation; // custom field value
 else :
 return $translation; // standard text
 endif;
 }
}
add_filter('gettext', array('Transformation_Text_Wrangler', 'reading_more'), 10, 4);

‘Read-more’ on all Excerpts in WordPress

Occasionally, the excerpt does not show a read-more at the end of the text. This is obviously the case, if the text content of the post is shorter than the set excerpt length.

Normally this is no problem – however, if your post contains images and/or important formatting, you would like to point the reader to the full post.

The above also assumes that you have customized your theme, to show a link to the post at the end of the excerpt – refer to the Codex chapter ‘Make the read-more link to the post‘.

A way to remedy the situation, is to edit functions.php of the theme, and to find the related code, such as:

function new_excerpt_more($more) {        global $post; 	return '<a href="'. get_permalink($post->ID) . '">' . 'Read the Rest...' . '</a>'; } add_filter('excerpt_more', 'new_excerpt_more');

Remove that, and add a new filter function in its place; something like:

function excerpt_read_more_link($output) {
 global $post;
 return $output . '<a href="'. get_permalink($post->ID) . '">Read All ...</a>';
}
add_filter('the_excerpt', 'excerpt_read_more_link');

And now you have a ‘read-more’ link at the end of each excerpt, linked to the full post.

Changing the ‘Read more’ in Twenty Ten Child Theme

To change the ‘read more’ text in a child theme of Twenty Ten, one needs to add a few lines to functions.php of the child theme.

This procedure uses a method that I came across in an introductory article about programming a child theme of Twenty Ten, by Aaron Jorbin, who himself was building upon Mangling strings for fun and profit, by WordPress lead Developer Peter Westwood.

class Transformation_Text_Wrangler {
function reading_more($translation, $text, $domain) {
$translations = &get_translations_for_domain( $domain );
if ( $text == 'Continue reading <span class="meta-nav">&rarr;</span>' ) {
return $translations->translate( 'Get to know more <span class="meta-nav">&raquo;</span>' );
}
return $translation;
}
}
add_filter('gettext', array('Transformation_Text_Wrangler', 'reading_more'), 10, 4);

This way of customising texts in a child theme is applicable to all the strings of the mother theme.