I'm beginning to create a custom theme for Wordpress. I've produced a brand new page known as 'Home' and hang the leading page to become a static page, choosing 'Home'. I would like this site to exhibit all posts having a group of 'news' plus a few images.

Then i added front-page.php using the following:

<?php get_header(); ?>

<div class='detail'>
  <?php if ( have_posts() ) {
    query_posts( 'category_name=news' );
    while ( have_posts() ) : the_post(); ?>
      <h4><?php the_date('d/m/Y'); ?> - <?php the_title(); ?></h4>
      <div class='post'><?php the_content(); ?></div>
    <?php endwhile; }?>
</div>

<?php get_footer(); ?>

I have submitted a few images and attached these to the 'Home' page. I would now like to obtain the URL for that attached images. I have attempted something similar to:

$images =& get_children('post_type=attachment&post_mime_type=image&post_parent=' . get_the_ID());

but this only returns the ID of the very recent publish being proven, even when I place the above code outdoors the loop. Basically take away the static top of the page and visit the Webpage i quickly obtain the correct results, any ideas the way i could possibly get the pictures for that Webpage after i utilize it like a static page?

Forgive me if this sounds like simple, first foray into PHP and wordpress development

I believe your problem is the fact that you are using get_the_ID() outdoors from the Loop. the_ID() and obtain_the_ID() grab the present publish ID in the loop if used outdoors from the Loop, all you will get may be the 4g iphone. See: http://codex.wordpress.org/Function_Reference/get_the_ID

To obtain the ID from the current page, try:

$page=get_page_by_title($page_name);
$images =& get_children('post_type=attachment&post_mime_type=image&post_parent='.$page->ID);

In the event that does not work, there is a function at http://wordpress.org/support/topic/how-to-get-page-id-using-php?replies=5 (Where I discovered the above mentioned code) that does exactly the same factor.

Hope this can help!