Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter mundza

    (@mundza)

    Hey Drew …

    I succeded with the code above it works like charm…

    foreach ( $attachments as $attachment_id => $attachment ) {
    	echo do_shortcode( '[download]' . wp_get_attachment_url( $attachment_id ) . '[download]' );

    I think bunch of people were looking for this and now its here to help ppl …
    Thanks a lot one more time .. nice job 🙂

    Thread Starter mundza

    (@mundza)

    ei sorry mate.. that worked i didt activated plugin before hhehe 😀 soorry again for 20000000 replies heheh 😀 thanks a lot once again 😀 very very helpfull… This is site that this plugin used on 😀 tnx

    Thread Starter mundza

    (@mundza)

    this is great idea that you came out with but not working… it should but its not working dont know why .. I hope you understand what I’m trieing to do.. in short: (wallpeper site, on every post i got 1 image, your download shortcode should download that image only)

    mundza
    Member
    Posted 10 hours ago #
    
    Hi
    
    i want to replace url that i NEED to provide inside the [download]and[/download] with my automatic get_attachment_url script:
    
    $attachments = get_children( array(
    	'post_parent'    => get_the_ID(),
    	'post_type'      => 'attachment',
    	'numberposts'    => 1, // show all -1
    	'post_status'    => 'inherit',
    	'post_mime_type' => 'image',
    	'order'          => 'ASC',
    	'orderby'        => 'menu_order ASC'
    ) );
    foreach ( $attachments as $attachment_id => $attachment ) {
    	echo do_shortcode( '[download]' . wp_get_attachment_url( $attachment_id ) . '[download]' );
    }

    this works amazing.. but not executing command

    Thanks

    Thread Starter mundza

    (@mundza)

    Thanks for fast reply.. This however doesnt work.. it just prints the function in the post/contetnt. Example this shows in content [download]http://my-wallpapers.com/wp-content/uploads/2013/12/481.jpg[download] but not doing that shortcode.

    Amer M.

Viewing 4 replies - 1 through 4 (of 4 total)