• Hey guys….
    First thing first, I am not a php coder. That’s why I am coming to you. After much searching the blogs and trial and error, I am asking for your help. Seems like a simple feet for someone who knows what they are doing.

    I am pulling post into my homepage and displaying content. I have categorized my blog content in the category name ‘homepage’. I am now adding several other blog categories but they are all being pulled into the homepage. How can I just pull in all post with category ‘homepage’?

    here’s my code… please help

    <?php $option = get_option(‘trt_options’); ?>

    <div class=”lay1″>

    <?php if(have_posts()): ?><?php while(have_posts()): ?><?php the_post(); ?>
    <div <?php post_class(); ?> id=”post-<?php the_ID(); ?>”>

    <div class=”post_image”>
    <!–CALL TO POST IMAGE–>
    <?php if ( has_post_thumbnail() ) : ?>
    <div class=”imgwrap”>
    <?php if($option[“trt_diss_date”] == “1”){ ?><?php } else { ?>
    <div class=”date_meta”><?php the_time(‘d’); ?>. <?php the_time(‘m’); ?>. <?php the_time(‘Y’); ?></div>
    <div class=”block_comm”><?php if (!empty($post->post_password)) { ?>
    <?php } else { ?><div class=”comments”><?php comments_popup_link( __(‘0 Comment’, ‘Triton’), __(‘1 Comment’, ‘Triton’), __(‘% Comment’, ‘Triton’), ”, __(‘Off’ , ‘Triton’)); ?></div><?php } ?></div>
    <?php } ?>

    “><?php the_post_thumbnail(‘medium’); ?></div>

    <?php elseif($photo = trt_get_images(‘numberposts=1’, true)): ?>

    <div class=”imgwrap”>
    <?php if($option[“trt_diss_date”] == “1”){ ?><?php } else { ?>

    <?php } ?>

    “><?php echo wp_get_attachment_image($photo[0]->ID ,’medium’); ?></div>

    <?php else : ?>

    <?php endif; ?>

    </div>
    <div class=”post_content”>
    <h2 class=”postitle”>” title=”<?php the_title_attribute(); ?>”><?php the_title(); ?></h2>
    <?php trt_excerpt(‘trt_excerptlength_teaser’, ‘trt_excerptmore’); ?>
    ” title=”<?php the_title_attribute(); ?>”><?php _e(‘Read More →’, ‘triton’); ?>
    </div>
    </div>
    <?php endwhile ?>

    <?php endif ?>

    </div>
    <div class=”lay1_page”><?php if (function_exists(“trt_paginate”)) {
    trt_paginate();
    } ?> </div><div class=”hidden_nav”><?php paginate_links(); ?></div>
    <br style=”clear:both” />

  • The topic ‘Limit call to categories’ is closed to new replies.