WordPress.org

Ready to get started?Download WordPress

Forums

Attachments
[resolved] Upgrade from 1.6.2.1 (2 posts)

  1. Brett2000
    Member
    Posted 5 months ago #

    Hi,

    I have latest WP, I have the old legacy Attachments 1.6.2.1, as indicated. I have code like this to display those attachment images in a slider:
    --

    if( function_exists( 'attachments_get_attachments' ) ) {
        $attachments = attachments_get_attachments();
        $total_attachments = count( $attachments );
    	$slides_index=0;
    	for( $i=0; $i<$total_attachments; $i++ ) {
    		$theid = $attachments[$i]['id'];
    		$full_img_url = wp_get_attachment_url($theid);
    		// GET LINK FROM RPS IMAGE GALLERY (RPS IMAGE GALLERY PLUGIN REQUIRED
    		$img_link_url = get_post_meta( $theid, '_rps_attachment_post_gallery_link', true );
    		// END GET LINK FROM RPS IMAGE GALLERY
    		$img_post_title = $attachments[$i]['title'];
    ?>
    							<div class="tt_slide" id="slide<?php echo $slides_index; ?>" style="left:<? echo (920*($slides_index)); ?>px">
    							<a href="<?php echo $img_link_url; ?>" title="<?php echo $img_post_title; ?>"><img src='<?php echo $full_img_url; ?>' width='878' alt="<?php echo $img_post_title; ?>" /></a>
    							</div>

    --

    When I upgraded to the latest attachments, and migrated the data, I end up with no attachments showing up? Do I need to re-write the code above to be exactly like your example on plugin home page? Or is there something else wrong?

    I really cannot end up losing the attachment data, or the links I am pulling using RPS Image Gallery plugin as I have added links to my attachments which I use to link out.

    Appreciate your help, and great plugin!

    Thanks you,
    -Brett

    http://wordpress.org/plugins/attachments/

  2. Jonathan Christopher
    Member
    Plugin Author

    Posted 5 months ago #

    Hi Brett, yes, as per the upgrade notes version 3.0 was a complete rewrite and requires that your template files be updated. Here are the docs for pulling data to your theme.

Reply

You must log in to post.

About this Plugin

About this Topic