Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter matdel

    (@matdel)

    Ok so nog real big change to the original code except a different function? Would you suggest using this over the original one?

    I use the first function for a lot of websites like product pages, where I want to display all child pages.

    Thread Starter matdel

    (@matdel)

    Below is the full code pasted in, I’m not following a 100% what you mean as I’m not a PHP developer..

    <?php get_header(); the_post (); ?>
    
    	<!-- CONTENT -->
    	<div id="maincontent" class="clearfix">
    		<div class="wrapper">
    			<div class="breadcrumbs">
    				<?php if ( function_exists('yoast_breadcrumb') ) {
    				yoast_breadcrumb('<p id="breadcrumbs">','</p>');
    				} ?>
    			</div>
    			<div id="content-left">
    				<?php $this_page_id=$wp_query->post->ID; ?>
    				<?php query_posts(array('showposts' => 4, 'orderby' => 'menu_order', 'order' => 'ASC', 'post_parent' => $this_page_id, 'post_type' => 'page')); while (have_posts()) { the_post(); ?>
    	                <?php if ( get_post_meta($post->ID, "post-img", true) ) { ?>
    	                <?php } else { ?>
    						<div class="dienst">
    							<?php the_post_thumbnail(); ?>
    							<h2><?php the_title(); ?></h2>
    							<p><?php the_field('dienst-beschrijving'); ?></p>
    						</div>
                    <?php } ?>
    				<?php } ?>
    				<?php wp_reset_query(); ?>
    			</div>
    			<div id="widget">
    				<?php the_content(); ?>
    			</div>
    		</div>
    	</div>
    	<div class="push"></div>
    </div>
    <!-- /CONTENT -->
    
    <?php get_footer(); ?>

    Would you suggest a different approach?

    Thread Starter matdel

    (@matdel)

    It’s not really a secondary loop as it’s the only loop on the page (if this is what you mean).

    I forgot to clear the query and that solved the problem, the page is working fine now. Thanks for the answer, will look into the chart when I get the time. 🙂

    The above is correct.

    By giving it an absolute positioning you are telling the logo to be positioned 60px from the top and 300px from the left no matter what.

Viewing 4 replies - 1 through 4 (of 4 total)