WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Am newbie. I have a custom post type 'dogs' and i want just 2 custom fields in this type. A pic on the left and text on the right - repeatable fields. Anyone know how to do this? I've no clue of php but can copy and paste! Am using Suffusion Custom Post Types and Custom Field Suite - I tried doing the above but I think i need to put some code in some php file somewhere...but I don't know where? or what code?! Thanks

share|improve this question
you can't do this without any clue of PHP – JMau Jun 24 '13 at 19:16

Yes I see you're right JMa - thought there would have been a simple copy past solution. So I've been trying to get my head around php. I created a template_dogs.php which includes the below code.

I put this into my child suffusion templates folder. It's picking the alt text up but not the image or description (the image comes in as a small square). And my footer doesn't display properly. I used Active Custom Fields plugin.

 * Template Name: Dogs

<div id="main-col">
    <div id="content" class='hfeed content'>
      <?php if(get_field('dogs')): ?>
        <div id="dogs">
            <?php while(the_repeater_field('dogs')): ?>
            <?php $image = wp_get_attachment_image_src(get_sub_field('image'), 'full'); ?>
            <img src="<?php echo $image[0]; ?>" alt="<?php  the_sub_field('image_alt');?>" />
            <?php the_sub_field('description');?>
        <?php endwhile; ?>
<?php endif; ?>
<?php get_footer(); ?>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.