Support » Fixing WordPress » One Child to Two Parents… Seems Like a Divorce, With Custody Issues

  • Resolved mumptastic

    (@mumptastic)


    I know it is not possible to have two parents to one child, but is there a way to get this information out onto another page?

    ===================

    Baseball
    -Baseballs <–Repeat this on another page.
    -Bats

    Balls
    -Basketballs
    -Baseballs <–same as the content above.

    ===================

    If anyone has an answer it would be much appreciated!

Viewing 6 replies - 1 through 6 (of 6 total)
  • I would probably do something with a shortcode to duplicate the page content onto the secondary page.

    Baseball > Baseballs would hold your content, then on Balls > Baseballs you’d add something like [mypageshortcode page=XX]

    I’m not aware of a shortcode that does that but it would be pretty easy to code up.

    Thread Starter mumptastic

    (@mumptastic)

    I fixed it with a loop!

    mumptastic, could you tell us the loop you fixed the problem with? Thanks!

    Thread Starter mumptastic

    (@mumptastic)

    <?php if ( (is_page('Baseballs')) or (is_page('All Balls'))){ ?>
    <ul class="products_page">
    <div class="title"><h1>Baseballs</h1></div>
       <?php
        query_posts(array('showposts' => 100, 'post_parent' => 97, 'post_type' => 'page', 'orderby' => 'title', 'order' => 'asc'));
    		while (have_posts()){
    			the_post(); //VITAL
    			$product = get_post_meta($post->ID, 'Product_thumb', true);
    
    		if ($product == ""){
    	$product = "http://site.com/IMG/coming_soon.png";
    			}
    			?>
                <li>
    
                <a href="<?php the_permalink() ?> class="grid-product">
                <img src="<?php echo $product ?>" title="<?php echo the_title() ?>"/>
    
    <div class="product_title"><?php the_title(); ?></div><br />
    	    </a>
    
                </li>
                <?php }
    	    wp_reset_query();
    	 ?>
    </ul>
    <?php } ?>
    Thread Starter mumptastic

    (@mumptastic)

    @gl Sorry it took me a day to get you the code. I am sure I could have used a more simple solution, but this did the trick for me.

    Thank you, mumptastic, that was very nice.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘One Child to Two Parents… Seems Like a Divorce, With Custody Issues’ is closed to new replies.