skinnymuldoon
Member
Posted 3 years ago #
I have inserted the more link on my home page (set as a page, not posts), adding the ¢more declaration before the loop and it is displaying perfectly but when I click on the link it just reloads the same page and the not the extended information....
Can anyone help?
SM
The more tag doesn't work in Pages without some custom editing.
skinnymuldoon
Member
Posted 3 years ago #
I did say that I have edited the page and added the global $more after the loop and I get the 'read more' link to show up. When I click on it all I get is the page reloaded.
What I need to do is find out how to make the 'read more' text actually link to the longer text?
I am sorry if this wasn't clear,
SM
Did you also reset the $more variable?
skinnymuldoon
Member
Posted 3 years ago #
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php global $more;
$more = 0;
?>
<li>
<?php if (is_page() || is_single()) { ?>
<h2 class="post-title"><?php the_title(); ?></h2>
<?php } else { ?>
<h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php } ?>
<?php if((!is_page() or $options['metaenabled']) or $options['txtsizechange']) { ?>
<div class="post-meta">
<?php if(!is_page() or $options['metaenabled']) { ?>
<div class="meta-left">
<p class="postdate"><?php the_time(__('M jS Y')) ?></p>
<p class="postauthor"><?php _e('By:');?> <?php the_author(); ?></p>
</div>
and further down.......
`<?php if((!is_single() and !is_archive() and !is_search() and $options['excerptfront']) or (is_archive() and $options['excerptarchives']) or (is_search() and $options['excerptsearch'])) { ?>
<?php the_excerpt(); ?>
<?php } else { ?>
<?php the_content('<span class="readmore">Read More</span>'); ?>
<?php } ?>
</div>`
I hope this helps......
Thank you,
SM
Try moving $more = 0; down to just before the_content()
also:
<?php if((!is_single() and !is_archive() and !is_search() and $options['excerptfront']) or (is_archive() and $options['excerptarchives']) or (is_search() and $options['excerptsearch'])) { ?>
might be better written as:
<?php if((!is_single() && !is_archive() && !is_search() && $options['excerptfront']) || ( (is_archive() && $options['excerptarchives']) ) || ) (is_search() && $options['excerptsearch']))) { ?>
skinnymuldoon
Member
Posted 3 years ago #
That still doesn't work - the page just reloads with the url /saldiving/#more-306.
Thank you for the tips re the coding.....
Any more ideas?
SM