Support » Plugin: Get Custom Field Values » how to add none text

  • michaelpon12

    (@michaelpon12)


    How do I add a none text in the php template using this code <?php echo c2c_get_custom('Gallery'); ?>?

    This is nested in the loop.

    <ul id="gallery-container">
    				<?php
    				    global $post;
    				    $post_slug = get_the_title($post->post_parent);
    					$args = array ( 'category_name' => $post_slug, 'posts_per_page' => -1, 'orderby' => title, 'order' => ASC);
    					$myposts = get_posts( $args );
    						foreach( $myposts as $post ) :	setup_postdata($post); ?>
    					<li data-id="<?php the_ID(); ?>">
    						<h3><?php the_title(); ?></h3>
    						<?php if (c2c_get_custom('Gallery')): ?>
    							<?php echo c2c_get_custom('Gallery'); ?>
    						<?php else : ?>
    						<?php endif; ?>
    					</li>
    				<?php wp_reset_postdata(); ?>
    				<?php endforeach; ?>
    			</ul>

  • The topic ‘how to add none text’ is closed to new replies.