the ‘read more’ seems to be hard coded – try if you can find it in index.php (?)
or for the same effect, try to add a filter to functions.php of your theme, to remove the anchor in the single post:
add_filter('the_content','remove_more_tag_jump_in_single_post');
function remove_more_tag_jump_in_single_post( $text ) {
if( is_single() ) $text = preg_replace( '|<span id="more-[0-9]+"></span>|', '', $text );
return $text;
}
(untested)
Thanks for the advice. I couldn’t find ‘read more’ in index.php but did track it down in page.php.
<?php global $theme; ?>
<div <?php post_class('post clearfix'); ?> id="post-<?php the_ID(); ?>">
<?php
if(has_post_thumbnail()) {
?><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(
array($theme->get_option('featured_image_width'), $theme->get_option('featured_image_height')),
array("class" => $theme->get_option('featured_image_position') . " featured_image")
); ?></a><?php
}
?>
<h2 class="title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'themater' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="postmeta-primary">
<span class="meta_date"><?php echo get_the_date(); ?></span>
<span class="meta_categories"><?php the_category(', '); ?></span>
</div>
<div class="entry clearfix">
<?php
the_content('');
?>
</div>
<?php if($theme->display('read_more')) { ?>
<div class="readmore">
<a href="<?php the_permalink(); ?>#more-<?php the_ID(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'themater' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php $theme->option('read_more'); ?></a>
</div>
<?php } ?>
</div><!-- Post ID <?php the_ID(); ?> -->
Could you please help me figure out how to alter this code so that it simply opens the page rather than scrolling down?
Thank you!
Er, actually the above code is in post.php. Apologies.
change this line:
<a href="<?php the_permalink(); ?>#more-<?php the_ID(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'themater' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php $theme->option('read_more'); ?></a>
to:
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'themater' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php $theme->option('read_more'); ?></a>
basically, remove the anchor part of the link:
#more-<?php the_ID(); ?>
Thank you so much, that worked great!
One last newbie question, if you don’t mind: How can I do this in a child theme so it will continue to work after updates?
Thanks again!
you would need to create a copy of post.php in the child theme, and edit it there.