Support » Plugin: Pods - Custom Content Types and Fields » Displaying Pods by Category

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Scott Kingsley Clark


    i have a post pod called kenya_safaris
    and a category pod called safari_category
    i have this in my archive.php
    $selected = pods_url_variable(-1);
    $pods= new Pod(‘kenya_safaris’);
    $params[‘select’] = ‘*’;
    $params[‘orderby’] = ‘’;
    $params[‘limit’] = 25;
    $params[‘where’] = ‘ LIKE “‘.$selected.'”‘;
    echo $pods->find( $params )->template( ‘Safari_Template’ );
    is there anything that i am doing wrong? coz i cant display post per category

    Plugin Author Scott Kingsley Clark


    Use the WordPress API and templating structure, it’s the easiest way to theme.


    Hey Scott Thanks for your help, I actually noticed that my problem was displaying custom fields in archive pages. I have managed to display the title and summary but i am having some problems with the image. My code in archive.php loop is:

    <h4 class="excerpt-title"><a>"><?php echo get_the_title(); ?> </a></h4>
     <?php $postimageurl = get_post_meta($post->ID, 'tiny_pic', true);
    if ($postimageurl) {
          <a>" rel="bookmark"><img src="<?php echo $postimageurl; ?>" alt="Post Pic"  class="tinyPic " width="150" height="150" /></a>
    <?php } else { ?>
          <a>" rel="bookmark"><img src="<?php bloginfo('template_url'); ?>/images/wprecipes.gif" class="tinyPic" alt="Screenshot" width="150" height="150" /></a>
    <?php } ?>
    <div id="summary"><?php echo get_post_meta($post->ID, 'summary', true); ?></div>
        <div id="readmore"><a>">Read More</a></div>

    My image is in a custom field pod
    I only have the image frame but it is not displaying the image. Pliz assist on this.

    Plugin Author Scott Kingsley Clark


    You could try using this instead when you output it:

    <?php echo pods_image_url( $postimageurl, 'thumbnail' ); ?>

    Thanks Scott it worked!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Displaying Pods by Category’ is closed to new replies.