Add my custom link
-
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 wp_get_attachment_url( $attachment_id ); } ?>
I want to use wp_get_attachment_url( $attachment_id ) instead of [download]ThisUrl[/download]
I want to use this download button on every post.. and i want it to be automatic.. i found how to get attachment URL .. now i need your suggestion.. My site is: and I want it to be Implemented in Content with all the other autotext i got..
Thanks in advance
Amer M.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Add my custom link’ is closed to new replies.