“Read More” to execute on Page instead of Index
-
Hi, I believe I am having the issue with my “Read More” links disabled on my blog “Page” as described in the post pasted below. I am exploring trying to create a page that pulls posts by category. I am not sure how this person’s fix works in my regards. I have also pasted the code I am using on my page. Any help?
————————-
This is probably because you’ve got the posts returning on a page, rather than the default index which is just returning posts.By default the ‘read more’ link is disabled on a page, so you have to set the variable to enable it, change:
<?php the_content(‘Read the full article…’); ?>
To
<?php
global $more;
$more = 0;
the_content(‘Read the full article…’);
?>——————My Code———————————-
<?php get_header();
/*
Template Name: Blog
*/
?><div id=”content”>
<?php if (have_posts()) : ?>
<?php query_posts(‘category_name=Blog&showposts=3’); ?>
<?php while (have_posts()) : the_post(); ?>
<div class=”single_column”>
<div class=”post-title”><h2><?php the_title(); ?></h2></div>
<div class=”post-date”><h3><?php the_time(‘F jS, Y’) ?> | <?php the_author_link(); ?></h3></div>
<div class=”entry”><?php the_content(‘Read More >’); ?>
<?php comments_popup_link(‘Make a Comment’, ‘1 Comment’, ‘% Comments’); ?></div>
</div><?php endwhile; ?>
<div class=”navigation”>
<span class=”previous-posts”><?php next_posts_link(‘< Older Posts’) ?></span>
<span class=”next-entries”><?php previous_posts_link(‘Newer Posts >’) ?></span></div>
<?php else : ?>
<h2>Not Found</h2>
<p>Sorry, but you are looking for something that isn’t here.</p>
<?php endif; ?> </div>
<!–/content –>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
- The topic ‘“Read More” to execute on Page instead of Index’ is closed to new replies.