Hi,

I've created a template in wordpress where the child pages of one page are displayed on the page. What is displayed is the thumbnail (feature item) of each page and the content of each page. The problem I'm having is that in Safari, the third (last page) is not displaying properly. Sometimes the thumbnail is appearing and no page content, and sometimes the third page doesn't appear at all. It has been checked in Firefox and Chrome and there are no errors.

This is the code:

<?php $pages = get_pages(array('child_of' => 7)); ?> 

    <?php foreach ($pages as $page): ?>

         <div class="leftimage">   <?php echo get_the_post_thumbnail($page->ID, 'thumbnail'); ?></div>
         <div class="textright"><h4><b><?php echo $page->post_title; ?></b></h4>
            <?php echo $page->post_content; ?> <p></p>


            </div>
                 <img src="<?php bloginfo(stylesheet_directory); ?>/images/line3.png" alt="Separator" width="700" height="30" />



    <?php endforeach; ?>
Member Avatar for diafol

php is done by the time it leaves the server, so all you're getting is standard html served to the browser. I can't see that it would be php. Most likely something to do with CSS or possibly javascript if you're manipulating tag attributes or nodes. Is this Ajaxified or just vanilla PHP?

Now that I've added a 4th page, it's still the third page that seems to cause an error. The image appears but no text and the 4th page and image doesn't appear at all. I have to refresh the page for it to appear. Then when I click on the link again it won't appear.

It's just PHP... I'm finding that the main div holding all the content doesn't wrap around the disappearing page even when the image is there but when all the pages are displayed. It wraps around all of them...

Fixed it :) Just needed to have an extra div around it!

Member Avatar for diafol

Mark as solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.