WordPress.org

Ready to get started?Download WordPress

Forums

using custom field thumbnails as page links (4 posts)

  1. dhl
    Member
    Posted 5 years ago #

    Can anyone tell me how I can substitute the subpage title for a thumbnail image that I enter in the page's custom fields?

    Here is the code that I'm working with:

    <?php
       if($post->post_parent)
       $children = wp_list_pages('title_li=&child_of='.$post->post_parent.'&echo=0'); else
       $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
       $PageThumb = c2c_get_custom('thumbnail');
    
       if ($children) { ?>
       <?php echo $children; ?>
       <?php } ?>

    So how can I wrap those child page links in my thumbnail image? This has got me stumped and I can't find a solution anywhere.

  2. dhl
    Member
    Posted 5 years ago #

    ok, so I got around it by putting the a href in the custom field with the image but I still need it to list the thumbnails of all the children of the parent not just the thumbnail of the current page which is what it's currently doing.

    ie.
    >parent
    >> child 1 thumbnail
    >> child 2 thumbnail
    >> child 3 thumbnail

    Is this possible with wp_list_pages? Or is there another way?

  3. byandreasdotcom
    Member
    Posted 5 years ago #

    Did you figure this out? I want to create a page that lists subpages like this: http://www.nathanlippy.com/

  4. rschuaman
    Member
    Posted 4 years ago #

    @ Dhl

    I have same problem. Can you find the solution for using custom field thumbnails as page links? Any ideas?

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic