Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter satsuki03

    (@satsuki03)

    I tried to switch themes and put it into twentytwelve. I re-checked all the codes again and changing the syntaxes made it work. (also made sure that the categories are correctly numbered as well.)

    Thank you very much for your help! 🙂

    Thread Starter satsuki03

    (@satsuki03)

    I did not mark it as resolved, I haven’t done it.

    Thread Starter satsuki03

    (@satsuki03)

    Using firebug to view it, yes the html tags do appear, I’ve also made sure that the category ids do exist, which is why I’m not really sure why the other part does not appear. 🙁

    Thread Starter satsuki03

    (@satsuki03)

    Hello, the whole code is like this.

    <div id="mid-container">
    <div id="latestn">
    <?php
       $recentposts = get_posts('numberposts=3&category=5');
       foreach ($recentposts as $post) :
           setup_postdata($post); ?>
           	<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
    
    			<?php include (TEMPLATEPATH . '/inc/meta.php' ); ?>
    
    			<div class="front">
    				<?php the_content(); ?>
    			</div>
    
    			<div class="postmetadata">
    				<?php the_tags('Tags: ', ', ', '<br />'); ?>
    				Posted in <?php the_category(', ') ?> |
    				<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
    			</div>
    <?php endforeach; ?>
    </div>
    
    <div id="latestb">
    <?php
       $recentposts = get_posts('numberposts=3&category=7');
       foreach ($recentposts as $post) :
           setup_postdata($post); ?>
           	<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
    
    			<?php include (TEMPLATEPATH . '/inc/meta.php' ); ?>
    
    			<div class="front">
    				<?php the_content(); ?>
    			</div>
    
    			<div class="postmetadata">
    				<?php the_tags('Tags: ', ', ', '<br />'); ?>
    				Posted in <?php the_category(', ') ?> |
    				<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
    			</div>
    <?php endforeach; ?>
    		</div>
    </div>

    By not working;
    After uploading it to the website, there should be two loops (two boxes containing different posts from different categories); it does not work in a way that there’s only one box that appears, when locally it works (both appears).

Viewing 4 replies - 1 through 4 (of 4 total)