• Hi,

    Upgraded wordpress and plugin to latest versions.

    I had custom posts created to populate the Portfolio section of the site. I could see the portfolios attached to each custom post type (or category name). But, now, when I go to the Portfolio page, I only see the Category Name, but no portfolio image is attached.

    I did not design this and can’t get in contact with the designer, so any help is appreciated. Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter inkster

    (@inkster)

    Note: this is the code in the file: Portfolio.php

    
    get_header(); ?>
    
    	<div id="primary" class="content-area">
    		<div class="home__get-a-free-consultion">
    				<span>Get A Free 20 Minute Consultation</span>
    		</div> <!-- Get a Free Consultion-->
    		<div class="site-portfolio">
    			<main id="main" class="site-main area-main" role="main">
    				<div class="site-container">
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php get_template_part( 'content', 'page' ); ?>
    
    				<?php endwhile; // end of the loop. ?>
    				</div>
    			</main><!-- #main -->
    			<div class="secondary">
    				<div class="categories-posts">
    					<div class="site-container">
    						<div class="menu-categories">
    							<ul>
    								<li class="real-estate"><span>Commercial Real Estate</span></li>
    								<li class="ecommerce-retail"><span>Ecommerce & Retail </span></li>
    								<li class="automotive-transportation"><span>Automotive & Transportation</span></li>
    								<li class="hospitality-travel"><span>Hospitality & Travel</span></li>
    								<li class="established-business"><span>Established Business</span></li>
    								<li class="entrepreneurs-startups"><span>Entrepreneurs & Startups</span></li>
    							</ul>
    						</div>
    					</div>
    				</div>
    				<div class="area-posts">
    					<div class="posts-by-category">
    						<div class="site-container">
    
    							<div class="custom-post-real-estate" style="display:none;">
    								<?php
    								$query = new WP_Query( array( 'post_type' => 'commercial-real', 'orderby' => 'rand', 'posts_per_page' => 3 ) );
    								?>
    								<?php if ($query->have_posts() ) :?>
    								<?php while( $query->have_posts() ) : $query->the_post(); ?>
    								<div class="post">
    									<div class="post-thumbnail">
    										<a class="link-post-thumbnail" href="<?php the_permalink(); ?>">
    										<?php
    											$mykey_values = get_post_custom_values( 'wpcf-thumbnail-post' );
    											 foreach( $mykey_values as $key => $value ) { ?>
    												<img src="<?php echo $value ?>">
    										<?php } ?>
    										</a>
    									</div> <!-- post-thumbnail -->
    								</div> <!-- post -->
    								<div class="post-landing" style="display: none;">
    									<div class="img-preview">
    										<?php
    											$mykey_values = get_post_custom_values( 'wpcf-preview-image-post' );
    											foreach( $mykey_values as $key => $value ) { ?>
    													<img src="<?php echo $value ?>">
    											<?php } ?>
    									</div>
    									<div class="post-content">
    										<?php the_content(); ?>
    									</div> <!-- post content -->
    								</div> <!-- post landing -->
    								<?php endwhile; ?>
    								<?php wp_reset_postdata(); ?>
    							<?php endif; ?>
    							</div> <!-- custom post -->
    
    							<div class="custom-post-ecommerce-retail" style="display:none;">
    								<?php
    								$query = new WP_Query( array( 'post_type' => 'ecommerce-retails', 'orderby' => 'rand', 'posts_per_page' => 3 ) );
    								?>
    
    								<?php if ($query->have_posts() ) :?>
    								<?php while( $query->have_posts() ) : $query->the_post(); ?>
    								<div class="post">
    									<div class="post-thumbnail">
    										<a class="link-post-thumbnail" href="<?php the_permalink(); ?>">
    										<?php
    											$mykey_values = get_post_custom_values( 'wpcf-thumbnail-post' );
    											 foreach( $mykey_values as $key => $value ) { ?>
    												<img src="<?php echo $value ?>">
    										<?php } ?>
    										</a>
    									</div> <!-- post-thumbnail -->
    								</div> <!-- post -->
    								<div class="post-landing" style="display: none;">
    									<div class="img-preview">
    										<?php
    											$mykey_values = get_post_custom_values( 'wpcf-preview-image-post' );
    											foreach( $mykey_values as $key => $value ) { ?>
    													<img src="<?php echo $value ?>">
    											<?php } ?>
    									</div>
    									<div class="post-content">
    										<?php the_content(); ?>
    									</div> <!-- post content -->
    								</div> <!-- post landing -->
    								<?php endwhile; ?>
    								<?php wp_reset_postdata(); ?>
    							<?php endif; ?>
    							</div> <!-- custom post ecommerce-retail-->
    
    							<div class="custom-post-automotive-transportation" style="display:none;">
    								<?php
    								$query = new WP_Query( array( 'post_type' => 'automotive', 'orderby' => 'rand', 'posts_per_page' => 3 ) );
    								?>
    
    								<?php if ($query->have_posts() ) :?>
    								<?php while( $query->have_posts() ) : $query->the_post(); ?>
    								<div class="post">
    									<div class="post-thumbnail">
    										<a class="link-post-thumbnail" href="<?php the_permalink(); ?>">
    										<?php
    											$mykey_values = get_post_custom_values( 'wpcf-thumbnail-post' );
    											 foreach( $mykey_values as $key => $value ) { ?>
    												<img src="<?php echo $value ?>">
    										<?php } ?>
    										</a>
    									</div> <!-- post-thumbnail -->
    								</div> <!-- post -->
    								<div class="post-landing" style="display: none;">
    									<div class="img-preview">
    										<?php
    											$mykey_values = get_post_custom_values( 'wpcf-preview-image-post' );
    											foreach( $mykey_values as $key => $value ) { ?>
    													<img src="<?php echo $value ?>">
    											<?php } ?>
    									</div>
    									<div class="post-content">
    										<?php the_content(); ?>
    									</div> <!-- post content -->
    								</div> <!-- post landing -->
    								<?php endwhile; ?>
    								<?php wp_reset_postdata(); ?>
    							<?php endif; ?>
    							</div> <!-- custom post automotive-transportation-->
    
    							<div class="custom-post-hospitality-travel" style="display:none;">
    								<?php
    								$query = new WP_Query( array( 'post_type' => 'hospitality-travel', 'orderby' => 'rand', 'posts_per_page' => 3 ) );
    								?>
    
    								<?php if ($query->have_posts() ) :?>
    								<?php while( $query->have_posts() ) : $query->the_post(); ?>
    								<div class="post">
    									<div class="post-thumbnail">
    										<a class="link-post-thumbnail" href="<?php the_permalink(); ?>">
    										<?php
    											$mykey_values = get_post_custom_values( 'wpcf-thumbnail-post' );
    											 foreach( $mykey_values as $key => $value ) { ?>
    												<img src="<?php echo $value ?>">
    										<?php } ?>
    										</a>
    									</div> <!-- post-thumbnail -->
    								</div> <!-- post -->
    								<div class="post-landing" style="display: none;">
    									<div class="img-preview">
    										<?php
    											$mykey_values = get_post_custom_values( 'wpcf-preview-image-post' );
    											foreach( $mykey_values as $key => $value ) { ?>
    													<img src="<?php echo $value ?>">
    											<?php } ?>
    									</div>
    									<div class="post-content">
    										<?php the_content(); ?>
    									</div> <!-- post content -->
    								</div> <!-- post landing -->
    								<?php endwhile; ?>
    								<?php wp_reset_postdata(); ?>
    							<?php endif; ?>
    							</div> <!-- custom post hospitality-travel-->
    
    							<div class="custom-post-established-business" style="display:none;">
    								<?php
    								$query = new WP_Query( array( 'post_type' => 'established-business', 'orderby' => 'rand', 'posts_per_page' => 3 ) );
    								?>
    
    								<?php if ($query->have_posts() ) :?>
    								<?php while( $query->have_posts() ) : $query->the_post(); ?>
    								<div class="post">
    									<div class="post-thumbnail">
    										<a class="link-post-thumbnail" href="<?php the_permalink(); ?>">
    										<?php
    											$mykey_values = get_post_custom_values( 'wpcf-thumbnail-post' );
    											 foreach( $mykey_values as $key => $value ) { ?>
    												<img src="<?php echo $value ?>">
    										<?php } ?>
    										</a>
    									</div> <!-- post-thumbnail -->
    								</div> <!-- post -->
    								<div class="post-landing" style="display: none;">
    									<div class="img-preview">
    										<?php
    											$mykey_values = get_post_custom_values( 'wpcf-preview-image-post' );
    											foreach( $mykey_values as $key => $value ) { ?>
    													<img src="<?php echo $value ?>">
    											<?php } ?>
    									</div>
    									<div class="post-content">
    										<?php the_content(); ?>
    									</div> <!-- post content -->
    								</div> <!-- post landing -->
    								<?php endwhile; ?>
    								<?php wp_reset_postdata(); ?>
    							<?php endif; ?>
    							</div> <!-- custom post established-business-->
    
    							<div class="custom-post-entrepreneurs-startups" style="display:none;">
    								<?php
    								$query = new WP_Query( array( 'post_type' => 'entrepreneur-startup', 'orderby' => 'rand', 'posts_per_page' => 3 ) );
    								?>
    
    								<?php if ($query->have_posts() ) :?>
    								<?php while( $query->have_posts() ) : $query->the_post(); ?>
    								<div class="post">
    									<div class="post-thumbnail">
    										<a class="link-post-thumbnail" href="<?php the_permalink(); ?>">
    										<?php
    											$mykey_values = get_post_custom_values( 'wpcf-thumbnail-post' );
    											 foreach( $mykey_values as $key => $value ) { ?>
    												<img src="<?php echo $value ?>">
    										<?php } ?>
    										</a>
    									</div> <!-- post-thumbnail -->
    								</div> <!-- post -->
    								<div class="post-landing" style="display: none;">
    									<div class="img-preview">
    										<?php
    											$mykey_values = get_post_custom_values( 'wpcf-preview-image-post' );
    											foreach( $mykey_values as $key => $value ) { ?>
    													<img src="<?php echo $value ?>">
    											<?php } ?>
    									</div>
    									<div class="post-content">
    										<?php the_content(); ?>
    									</div> <!-- post content -->
    								</div> <!-- post landing -->
    								<?php endwhile; ?>
    								<?php wp_reset_postdata(); ?>
    							<?php endif; ?>
    							</div> <!-- custom post entrepreneurs-startups-->
    
    						</div> <!-- site container -->
    					</div> <!-- posts by category -->
    				</div> <!-- area posts -->
    			</div> <!-- Secondary -->
    		</div> <!-- site portfolio -->
    	</div><!-- #primary -->
    
    <?php get_footer(); ?>
    
    Thread Starter inkster

    (@inkster)

    Sorry, it pasted weird, here it is again:

    get_header(); ?>

    <div id=”primary” class=”content-area”>
    <div class=”home__get-a-free-consultion”>
    <span>Get A Free 20 Minute Consultation</span>
    </div> <!– Get a Free Consultion–>
    <div class=”site-portfolio”>
    <main id=”main” class=”site-main area-main” role=”main”>
    <div class=”site-container”>
    <?php while ( have_posts() ) : the_post(); ?>

    <?php get_template_part( ‘content’, ‘page’ ); ?>

    <?php endwhile; // end of the loop. ?>
    </div>
    </main><!– #main –>
    <div class=”secondary”>
    <div class=”categories-posts”>
    <div class=”site-container”>
    <div class=”menu-categories”>

      <li class=”real-estate”><span>Commercial Real Estate</span>
      <li class=”ecommerce-retail”><span>Ecommerce & Retail </span>
      <li class=”automotive-transportation”><span>Automotive & Transportation</span>
      <li class=”hospitality-travel”><span>Hospitality & Travel</span>
      <li class=”established-business”><span>Established Business</span>
      <li class=”entrepreneurs-startups”><span>Entrepreneurs & Startups</span>

    </div>
    </div>
    </div>
    <div class=”area-posts”>
    <div class=”posts-by-category”>
    <div class=”site-container”>

    <div class=”custom-post-real-estate” style=”display:none;”>
    <?php
    $query = new WP_Query( array( ‘post_type’ => ‘commercial-real’, ‘orderby’ => ‘rand’, ‘posts_per_page’ => 3 ) );
    ?>
    <?php if ($query->have_posts() ) :?>
    <?php while( $query->have_posts() ) : $query->the_post(); ?>
    <div class=”post”>
    <div class=”post-thumbnail”>
    “>
    <?php
    $mykey_values = get_post_custom_values( ‘wpcf-thumbnail-post’ );
    foreach( $mykey_values as $key => $value ) { ?>
    “>
    <?php } ?>

    </div> <!– post-thumbnail –>
    </div> <!– post –>
    <div class=”post-landing” style=”display: none;”>
    <div class=”img-preview”>
    <?php
    $mykey_values = get_post_custom_values( ‘wpcf-preview-image-post’ );
    foreach( $mykey_values as $key => $value ) { ?>
    “>
    <?php } ?>
    </div>
    <div class=”post-content”>
    <?php the_content(); ?>
    </div> <!– post content –>
    </div> <!– post landing –>
    <?php endwhile; ?>
    <?php wp_reset_postdata(); ?>
    <?php endif; ?>
    </div> <!– custom post –>

    <div class=”custom-post-ecommerce-retail” style=”display:none;”>
    <?php
    $query = new WP_Query( array( ‘post_type’ => ‘ecommerce-retails’, ‘orderby’ => ‘rand’, ‘posts_per_page’ => 3 ) );
    ?>

    <?php if ($query->have_posts() ) :?>
    <?php while( $query->have_posts() ) : $query->the_post(); ?>
    <div class=”post”>
    <div class=”post-thumbnail”>
    “>
    <?php
    $mykey_values = get_post_custom_values( ‘wpcf-thumbnail-post’ );
    foreach( $mykey_values as $key => $value ) { ?>
    “>
    <?php } ?>

    </div> <!– post-thumbnail –>
    </div> <!– post –>
    <div class=”post-landing” style=”display: none;”>
    <div class=”img-preview”>
    <?php
    $mykey_values = get_post_custom_values( ‘wpcf-preview-image-post’ );
    foreach( $mykey_values as $key => $value ) { ?>
    “>
    <?php } ?>
    </div>
    <div class=”post-content”>
    <?php the_content(); ?>
    </div> <!– post content –>
    </div> <!– post landing –>
    <?php endwhile; ?>
    <?php wp_reset_postdata(); ?>
    <?php endif; ?>
    </div> <!– custom post ecommerce-retail–>

    <div class=”custom-post-automotive-transportation” style=”display:none;”>
    <?php
    $query = new WP_Query( array( ‘post_type’ => ‘automotive’, ‘orderby’ => ‘rand’, ‘posts_per_page’ => 3 ) );
    ?>

    <?php if ($query->have_posts() ) :?>
    <?php while( $query->have_posts() ) : $query->the_post(); ?>
    <div class=”post”>
    <div class=”post-thumbnail”>
    “>
    <?php
    $mykey_values = get_post_custom_values( ‘wpcf-thumbnail-post’ );
    foreach( $mykey_values as $key => $value ) { ?>
    “>
    <?php } ?>

    </div> <!– post-thumbnail –>
    </div> <!– post –>
    <div class=”post-landing” style=”display: none;”>
    <div class=”img-preview”>
    <?php
    $mykey_values = get_post_custom_values( ‘wpcf-preview-image-post’ );
    foreach( $mykey_values as $key => $value ) { ?>
    “>
    <?php } ?>
    </div>
    <div class=”post-content”>
    <?php the_content(); ?>
    </div> <!– post content –>
    </div> <!– post landing –>
    <?php endwhile; ?>
    <?php wp_reset_postdata(); ?>
    <?php endif; ?>
    </div> <!– custom post automotive-transportation–>

    <div class=”custom-post-hospitality-travel” style=”display:none;”>
    <?php
    $query = new WP_Query( array( ‘post_type’ => ‘hospitality-travel’, ‘orderby’ => ‘rand’, ‘posts_per_page’ => 3 ) );
    ?>

    <?php if ($query->have_posts() ) :?>
    <?php while( $query->have_posts() ) : $query->the_post(); ?>
    <div class=”post”>
    <div class=”post-thumbnail”>
    “>
    <?php
    $mykey_values = get_post_custom_values( ‘wpcf-thumbnail-post’ );
    foreach( $mykey_values as $key => $value ) { ?>
    “>
    <?php } ?>

    </div> <!– post-thumbnail –>
    </div> <!– post –>
    <div class=”post-landing” style=”display: none;”>
    <div class=”img-preview”>
    <?php
    $mykey_values = get_post_custom_values( ‘wpcf-preview-image-post’ );
    foreach( $mykey_values as $key => $value ) { ?>
    “>
    <?php } ?>
    </div>
    <div class=”post-content”>
    <?php the_content(); ?>
    </div> <!– post content –>
    </div> <!– post landing –>
    <?php endwhile; ?>
    <?php wp_reset_postdata(); ?>
    <?php endif; ?>
    </div> <!– custom post hospitality-travel–>

    <div class=”custom-post-established-business” style=”display:none;”>
    <?php
    $query = new WP_Query( array( ‘post_type’ => ‘established-business’, ‘orderby’ => ‘rand’, ‘posts_per_page’ => 3 ) );
    ?>

    <?php if ($query->have_posts() ) :?>
    <?php while( $query->have_posts() ) : $query->the_post(); ?>
    <div class=”post”>
    <div class=”post-thumbnail”>
    “>
    <?php
    $mykey_values = get_post_custom_values( ‘wpcf-thumbnail-post’ );
    foreach( $mykey_values as $key => $value ) { ?>
    “>
    <?php } ?>

    </div> <!– post-thumbnail –>
    </div> <!– post –>
    <div class=”post-landing” style=”display: none;”>
    <div class=”img-preview”>
    <?php
    $mykey_values = get_post_custom_values( ‘wpcf-preview-image-post’ );
    foreach( $mykey_values as $key => $value ) { ?>
    “>
    <?php } ?>
    </div>
    <div class=”post-content”>
    <?php the_content(); ?>
    </div> <!– post content –>
    </div> <!– post landing –>
    <?php endwhile; ?>
    <?php wp_reset_postdata(); ?>
    <?php endif; ?>
    </div> <!– custom post established-business–>

    <div class=”custom-post-entrepreneurs-startups” style=”display:none;”>
    <?php
    $query = new WP_Query( array( ‘post_type’ => ‘entrepreneur-startup’, ‘orderby’ => ‘rand’, ‘posts_per_page’ => 3 ) );
    ?>

    <?php if ($query->have_posts() ) :?>
    <?php while( $query->have_posts() ) : $query->the_post(); ?>
    <div class=”post”>
    <div class=”post-thumbnail”>
    “>
    <?php
    $mykey_values = get_post_custom_values( ‘wpcf-thumbnail-post’ );
    foreach( $mykey_values as $key => $value ) { ?>
    “>
    <?php } ?>

    </div> <!– post-thumbnail –>
    </div> <!– post –>
    <div class=”post-landing” style=”display: none;”>
    <div class=”img-preview”>
    <?php
    $mykey_values = get_post_custom_values( ‘wpcf-preview-image-post’ );
    foreach( $mykey_values as $key => $value ) { ?>
    “>
    <?php } ?>
    </div>
    <div class=”post-content”>
    <?php the_content(); ?>
    </div> <!– post content –>
    </div> <!– post landing –>
    <?php endwhile; ?>
    <?php wp_reset_postdata(); ?>
    <?php endif; ?>
    </div> <!– custom post entrepreneurs-startups–>

    </div> <!– site container –>
    </div> <!– posts by category –>
    </div> <!– area posts –>
    </div> <!– Secondary –>
    </div> <!– site portfolio –>
    </div><!– #primary –>

    <?php get_footer(); ?>

    Plugin Support Beda

    (@bedas)

    I cannot assist custom code, but to me it seems you would need to check what a simple call to the Post Meta using our ShortCodes does output.

    Also, when you head to those Posts, where you attached the images, can you see the URL’s in the supposed field?

    Please try to output the Field in a post body using the ShortCode that our GUI provides.

    If that works, then there is an issue with your code, that I cannot assist, but you could get more information here:
    https://wp-types.com/documentation/customizing-sites-using-php/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can’t see images’ is closed to new replies.