Support

Account

Forum Replies Created

  • @elliot

    Works like a charm! Thanks 🙂

    Cheers,

    GM

  • Hi @elliot.

    Sorry my bad.

    That was some older code. I did in fact use a img tag but to no success.

    								<?php $child_pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = ".$post->ID." AND post_type = 'page' ORDER BY menu_order", 'OBJECT');    ?>
                                    <?php if ( $child_pages ) : foreach ( $child_pages as $pageChild ) : setup_postdata( $pageChild ); ?>
                                    <li>
                                    	<a href="<?php echo get_permalink($pageChild->ID); ?>" rel="bookmark" title="<?php echo $pageChild->post_title; ?>">
                                        <div class="subdivision">
                                        	<?php
    										if (get_field('sub_division_image')){ ?>
    										  	<img src="<?php the_field('sub_division_image'); ?>" alt="<?php echo $pageChild->post_title; ?>" />
    										  <?php } else {
    											 echo "Hello world";
                                              } ?>
                                        </div>
                                        <p><?php echo $pageChild->post_title; ?></p>
                                        </a>
                                    </li>                              
                                    <?php endforeach; endif; ?>

    Any thoughts?

    Cheers,

    GM

  • Hi all,

    I’m new using this plugin and I have the same issue here.

    I have this code:

    <?php $child_pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = ".$post->ID." AND post_type = 'page' ORDER BY menu_order", 'OBJECT');    ?>
    <?php if ( $child_pages ) : foreach ( $child_pages as $pageChild ) : setup_postdata( $pageChild ); ?>
    <li>
    <a href="<?php echo get_permalink($pageChild->ID); ?>" rel="bookmark" title="<?php echo $pageChild->post_title; ?>">
    <div class="subdivision">
    <?php
    if (get_field('sub_division_image')){ ?>
    <?php the_field('sub_division_image'); ?>
    <?php } else {
    echo "Hello world";
    } ?>
    </div>
    <p><?php echo $pageChild->post_title; ?></p>
    </a>
    </li>                              
    <?php endforeach; endif; ?>

    But there is no way to get the image to show up on my page. If I use the plugin as a custom text field it will work just fine. Any help would be very appreciated!

    Thanks.

    GM

Viewing 3 posts - 1 through 3 (of 3 total)