• Resolved syncbox

    (@syncbox)


    I’m trying to display a meta key value (Org-Logo) using c2c’s c2c_get_recent_custom() function outside of the main display page’s loop (per instructions for plugin). Here’s my markup:

    <?php
    echo c2c_get_recent_custom('Org-Logo','<img src="https://example.org/wp-content/uploads/','" class="thumbsize" />','',' ','',300,false,'DESC',true); ?>

    to display up to 300 logos, arranged via the thumbsize class.

    I get nothing. However, if I remove all but the first 5 vars, I get ONE logo (the last one added)

    I believe it should work, but it doesn’t. The documentation says that $limit is: Optional argument. The limit to the number of custom fields to retrieve.

    any suggestions or ideas? What am I doing wrong?

Viewing 2 replies - 1 through 2 (of 2 total)
  • MichaelH

    (@michaelh)

    Have you looked at Custom Fields and some of the info there to retrieve and display custom fields.

    Thread Starter syncbox

    (@syncbox)

    Got this working….

    <?php
     $lastposts = get_posts('numberposts=300&child_of=323&post_type=page&post_parent=323&orderby=rand');
     foreach($lastposts as $post) :
        setup_postdata($post);
     ?>
     <a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php echo c2c_get_custom('Org-Logo','<img src="https://domainobscured.org/wp-content/uploads/','" class="thumbsize" alt="" />','',' ',''); ?></a>
    
     <?php endforeach; ?>

    thanks for all your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘c2c_get_custom() and displaying more than one value’ is closed to new replies.