How do I choose to display only the summary of a blog post in the blog page + the "continue reading" link at the bottom? Right now the entire content shows in the blog page preview and it still shows the "continue reading." Thanks.
function linkwithin_add_hook($content) { if (!is_feed() && !is_page() && is_okplacefor_linkwithin()) { global $post, $wp_query, $linkwithin_code_start, $linkwithin_code_end;
function linkwithin_add_code($content) { if (!is_feed() && !is_page() && is_okplacefor_linkwithin()) { global $post, $wp_query, $linkwithin_code_start, $linkwithin_code_end;
if ($wp_query->current_post + 1 == $wp_query->post_count) { $embed_code = '
function is_okplacefor_linkwithin() { // show the widget for all single posts, or if the user has elected to show it elsewhere return (is_single() || ! get_option('linkwithin_single_only')); }
// add the linkwithin options page to the settings area function linkwithin_add_options_page() { add_options_page('LinkWithin', 'LinkWithin', 9, 'linkwithin', 'linkwithin_options'); }
// handle/display the options page function linkwithin_options() { if ($_POST['action'] == 'update') { update_option('linkwithin_single_only', $_POST['linkwithin_single_only']); echo "
Comments
I would like to remove the "continue reading" button as it is displaying the whole post already anyway.
how long your posts are?
Best,
Miłosz
Do you use read_more tag?
Best,
Miłosz
My blog shows all post except the leave comment box.
how you add this "You might also like:" section to your posts?
It will help me to find problem.
Best,
Miłosz
here is thier code:
<?php
/*
Plugin Name: LinkWithin
Plugin URI: http://www.linkwithin.com/
Description: Displays recommended stories and associated thumbnails from your blog
Version: 0.85
Author: LinkWithin
*/
$linkwithin_code_start = "//LinkWithinCodeStart";
$linkwithin_code_end = "//LinkWithinCodeEnd";
function linkwithin_add_hook($content) {
if (!is_feed() && !is_page() && is_okplacefor_linkwithin()) {
global $post, $wp_query, $linkwithin_code_start, $linkwithin_code_end;
$permalink = get_permalink($post->ID);
$content .= '';
$content = linkwithin_add_code($content);
}
return $content;
}
function linkwithin_add_code($content) {
if (!is_feed() && !is_page() && is_okplacefor_linkwithin()) {
global $post, $wp_query, $linkwithin_code_start, $linkwithin_code_end;
if ($wp_query->current_post + 1 == $wp_query->post_count) {
$embed_code = '
';
$content .= $embed_code;
}
}
return $content;
}
function is_okplacefor_linkwithin() {
// show the widget for all single posts, or if the user has elected to show it elsewhere
return (is_single() || ! get_option('linkwithin_single_only'));
}
// add the linkwithin options page to the settings area
function linkwithin_add_options_page() {
add_options_page('LinkWithin', 'LinkWithin', 9, 'linkwithin', 'linkwithin_options');
}
// handle/display the options page
function linkwithin_options() {
if ($_POST['action'] == 'update') {
update_option('linkwithin_single_only', $_POST['linkwithin_single_only']);
echo "
LinkWithin settings updated.
}
$linkwithin_single_only = get_option('linkwithin_single_only');
?>
LinkWithin Settings
<?php wp_nonce_field('update-options'); ?>
Placement
> Show LinkWithin only on Single Posts
" type="submit">
<?php
}
// don't show widget code in excerpts
function linkwithin_display_excerpt($content){
global $linkwithin_code_start, $linkwithin_code_end;
$posStart = strpos($content, $linkwithin_code_start);
$posEnd = strpos($content, $linkwithin_code_end);
if ($posStart){
if ($posEnd == false){
$content = str_replace(substr($content,$posStart,strlen($content)),'',$content);
} else {
$content = str_replace(substr($content,$posStart,$posEnd-$posStart+strlen($linkwithin_code_end)),'',$content);
}
}
$content = $content . linkwithin_add_code('');
return $content;
}
add_filter('the_excerpt', 'linkwithin_display_excerpt');
add_filter('the_content', 'linkwithin_add_hook');
add_action('admin_menu', 'linkwithin_add_options_page');
?>
this plugin in adds its own filter:
add_filter('the_excerpt', 'linkwithin_display_excerpt');
and broke ours.
It may takes a lot of changes to adept our template to this.
We do not support this plugin in.
Best,
Miłosz