Forums

Showing posts in pages (3 posts)

  1. jimmytubbs
    Member
    Posted 2 years ago #

    When i use my normal code to show posts where posts should show every thing is blank and
    when i tryed this

    <div id="content">
    <?php if (have_posts()) : the_post(); ?>
    <h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); // of the page ?></a></h1>
    <?php the_content(); // of the page
    endif; ?>
    
    	<?php if (is_page('21')) :	// nr of the page you want news in
    	$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; // restaure pagination
    	query_posts("cat=1&paged=$paged"); // nr of the category you want selected in this page
    	$more = 0;		// "Read More" in anothe page than Archive thanks to http://wordpress.org/support/topic/67173?replies=16
    		 if (have_posts()) : while (have_posts()) : the_post();?>
    			<div class="entry">
    			<h3 class="entrytitle" id="post-<?php the_ID(); ?>"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    			<div class="entrybody">
    			<p class="entrydate"><?php the_date('','<span>','</span>, '); ?>at <?php the_time(); ?> :</p>
    			<?php the_content(); ?>
    			</div>
    			</div>
    	 	<?php endwhile; endif; ?>
    		 	<div class="navigation">
    			<span class="left"><?php next_posts_link('&laquo; pr&eacute;c&eacute;dentes actus') ?></span>
    			<!--<span class="left"><a href="/archives/" title="Acc&eacute;der aux rubriques, tags et archives mensuelles">archives des actus adh&eacute;rents</a></span>-->
    			<span class="right"><?php previous_posts_link('actus plus fra&icirc;ches &raquo;') ?></span>
    			</div>
    	<?php endif; ?>
    </div>
    <a href="http://wordpress.org/support/topic/252598?replies=3">Link</a>

    It just shows the title in a permalink of the page?

    Any help on how to show posts in pages

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    That code is set to only show post if the page has the ID of 21 and then will only show posts from Category 1. Is that correct?

  3. jimmytubbs
    Member
    Posted 2 years ago #

    Still only shows the post as a page

Topic Closed

This topic has been closed to new replies.

About this Topic