Rating: 5 stars
thank you
]]>Rating: 5 stars
Just simply highlight what you need from the custom field and add it to the post.
I used the Pods Template and doing great
Rating: 5 stars
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>
]]>
Rating: 5 stars
Thanks Scott, this one works the magic. Used it on WP3.5 and MU setup and works in loop without any issue. Perfect. very nicely coded. 10+
]]>