• Hello Guys!
    I would like to display text under each of the images on the portfolio page of the following webstie:
    andystoll.net/studio2

    Obviously it is using a php generated template so I dont know how to add the textbox under each portfolio item. the following is the php code for the specific portfolio page:
    Thanks in advance for all your help!!!

    <!--PORTFOLIO : STARTS-->
       <div class="row layout">
        <section id="<?php echo $new_title; ?>" <?php $class = "twelve columns outer-wrap page-$count"; post_class($class); ?>>
            <div class="story">
              <div class="row">
                <div class="twelve columns add-top">
                     <h2 class="main-heading-alt  color-high"><?php echo $page_heading_booster;?> <span class="main-heading white-txt" style="color:<?php echo $theme_option['page_'.$count.'_h_color'];?> !important;"><?php echo $page_heading;?> </span></h2>
                </div>
              </div>
                <?php if($theme_option['portfolio_intro']): ?>
                <section class="row">
                    <p id="work-intro" class="twelve columns medium-para white-txt pad-top pad-bottom" style="color:<?php echo $theme_option['portfolio_intro_textcolor'];?> !important;">
                    <?php echo $theme_option['portfolio_intro']; ?>
                    </p>
                </section>
              <?php endif; ?>
    
                <?php
                //Get portfolio categories
                 $categories = get_categories(array('type' => 'portfolio_item', 'taxonomy' => 'portfolio_category'));
                ?>
                <section class="row">
                  <ul class="filter group">
                     <li class="current all"><a href="#">All</a></li>
                    <?php
                     foreach($categories as $category):
                        $categoryClass = strtolower($category->slug);
                        echo '<li class="'.$categoryClass.'"><a href="#">'.$category->name.'</a></li>';
                     endforeach;//Categories
                    ?>
                  </ul>
                </section>
    
                <article class="twelve columns">
                <div id="myworks-info" class="remove-top">
    
        <ul class="myworks group clearfix">
           <?php
           $loop = new WP_Query( array( 'post_type' => 'portfolio_item', 'orderby' => 'date', 'order' => 'ASC','posts_per_page' => 18,'paged'=>false ) );
           ?> 
    
           <?php
            while ( $loop->have_posts() ) : $loop->the_post();
            $cate = wp_get_post_terms($post->ID, $taxonomy = 'portfolio_category');
            //print_r($cate);
            $video_url =  get_post_meta( $post->ID,'video_url',true);
            if(!$video_url){
           ?>
    
            <li class="item" data-id="id-<?php the_ID(); ?>" data-type="<?php  echo strtolower($cate[0]->slug); ?>">
                <a data-fancybox-group="gallery" class="fancybox-effects-d"
                href="<?php
                  //Get the Thumbnail URL
                  $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full', true, '' );
                  echo $src[0];
                  ?>" title="">
    
                  <div class="overlay-block"><h4 class="work-item-name"><?php  echo get_the_title(); ?></h4></div>
                <?php
                if(has_post_thumbnail()):
                   the_post_thumbnail('thumbnail');
                else:
                   echo '<img src="'.get_bloginfo("template_url").'/images/default-featured-image.png" class="portfolio-thumb" width="60" height="60"/>';
                endif;
                ?>
                </a>
    
            </li>  
    
    	<?php } else { ?>
    
    <li class="item" data-id="id-<?php the_ID(); ?>" data-type="<?php  echo strtolower($cate[0]->slug); ?>">
          <a class="fancybox-media" href="<?php echo $video_url; ?>" title="Use your mouse wheel to scroll between images. This text can be used as a title or description">
            <div class="overlay-block"><h4 class="work-item-name"><?php  echo get_the_title(); ?></h4></div>
    	 <?php
                if(has_post_thumbnail()):
                   the_post_thumbnail('thumbnail');
                else:
                   echo '<img src="'.get_bloginfo("template_url").'/images/default-featured-image.png" class="portfolio-thumb" width="60" height="60"/>';
                endif;
                ?>
         </a>
    </li>
           <?php } ?>
    
           <?php endwhile; ?>
    </ul>             
    
                </div>
            </article>
            </div> 
    
        </section>
      </div>

The topic ‘using php to get text with theme persona’ is closed to new replies.