"Read more" tag ignored in subpages
-
Hi all,
I’d like to influence the excerpt length for subpages. Often the text is cut in the middle of the senctence, which doesn’t read well.Unforunately the “read more” tag is being ignored in pages (in arcticles it works). Is there a way of getting this done? Alternatively I would like to have no excerpt text in subpages at all. Is this possible? I couldn’t find a menu item do deactivate this.
Thanks for any help
Excerpts in pages isn’t enabled by default.
If you want to completely remove excerpts from displaying in child-pages you have to make some changes in loop-children.php. The best way is to copy entire content of loop-children.php into new file, (and call it loop-children.php) and place it in child-theme folder and remove
the_excerpt();
tag in that file.If you want to control the excerpts in pages like in post then add this code in child-theme functions.php:
<?php
// add excerpts to pages
function add_page_excerpt_meta_box() {
add_meta_box( 'postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 'page', 'normal', 'core' );
}
add_action( 'admin_menu', 'add_page_excerpt_meta_box' );
?>Thanks Luko, that’s exactly what I wanted to have. But I copy-pasted your function into graphene theme-functions.php, as I’m not familiar to setting up a child theme. Is there a how-to somewhere?
ModGIYF: Google is your friend
Quote:Thanks Luko, that’s exactly what I wanted to have. But I copy-pasted your function into graphene theme-functions.php, as I’m not familiar to setting up a child theme. Is there a how-to somewhere?You have ready made Graphene child theme here:
thanxs to Prasanna.
Install it like any other theme…
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.