• Ok.. here goes.

    Lets say I have the following code working to show the child pages of a parent page (and inline child pages of current child page):

    <?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");
      if ($children) { ?>
      <ul>
      <?php echo $children; ?>
      </ul>
      <?php } ?>

    How can I turn this into a wordpress widget/plugin so that all I have to do to make it visible on a page is drag and drop the new, corresponding widget into the sidebar?

    Thanks,

    Phil

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘WordPress Loop Code to WordPress Widget’ is closed to new replies.