I understand this goes within the wordpress forum, but I have published in regards to a half dozen questions there and also have never become any reactions - I love the city here a lot more, do not move this to wordpress.

I am searching for a method to extract the attachment (might be a photo, youtube vid, or soundcloud song) of the category's newest publish, re-size it, after which display it on my small home page. Take a look at my website at http://beachief.com/ to determine what i'm saying - the "Daily Chief" and "Tribal Music" sections are where I do. I effectively resized the pictures above individuals two sections with this particular code:

<img src="<?php bloginfo('template_url'); ?>/images/philadelphia.jpg" alt="Featured picture" class="scaled"/>

But that only works best for images which i come with an exact file place to. This is actually the code I am using to obtain my newest posts and display a few of their contents:

<ul class="link-item"> <?php $feature_post = get_posts( 'category=4&numberposts=1' ); ?>
<?php foreach( $feature_post as $post ) : setup_postdata( $post ); ?>
<li><h2 class="link-item"><?php the_category(' '); ?></h2></li>
<?php endforeach; ?>
<?php $feature_post = get_posts( 'category=4&numberposts=1' ); ?>
<?php foreach( $feature_post as $post ) : setup_postdata( $post ); ?>
   <li class="list-time"><?php the_time('d'); ?>.<?php the_time('M'); ?></li>
   <li class="list-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
   <li class="link-item"><?php the_excerpt(); ?></li>
<?php endforeach; ?> </ul>

I wish to eliminate the excerpt and display the posts attachment, resized to complement the posts width. How do i do that? Thanks

The easiest method to do this is to make use of featured images:

Inside your theme's functions.php file:

add_theme_support( 'post-thumbnails' ); // add theme support
add_image_size( 'home-feature', 100, 100, true ); // add an image size 

I have set the look size to become 100x100 - but clearly you alter this to meet your requirements

See http://codex.wordpress.org/Function_Reference/add_theme_support and http://codex.wordpress.org/Function_Reference/add_image_size for more information on these

Then rather than <?php the_excerpt; ?> you'd have:

<?php if(has_post_thumbnail()) {
    the_post_thumbnail( 'home-feature' );
} else {
    // could show a standard image here - e.g. a grey box
} ?>

More information on this is often found here: http://codex.wordpress.org/Function_Reference/has_post_thumbnail and here: http://codex.wordpress.org/Function_Reference/the_post_thumbnail

UPDATE Sorry just spotted that you simply stated accessories, an option is something like:

$args = array(
'post_type' => 'attachment',
   'numberposts' => -1, // bring them all
   'post_status' => null,
   'post_parent' => $post->ID, // post id with the gallery
   'orderby' => 'menu_order',
   'order' => 'ASC'
$attachments = get_posts($args);
if(count($attachments) > 0) {
    foreach((array)$attachments as $attachment) {
        ?><li><img src="<?php print wp_get_attachment_url($img->ID); ?>" width="448" height="290" alt="<?php print $img->post_title;?>" title="<?php print $img->post_title;?>"></li><?php

Clearly within this foreach I have assumed all of the accessories are images, however, you could equally swap this to just output the attachment