How to take a value from "link to" in Photo Gallery Wordpress

51 views Asked by At

I would like to take a value from input "link to" in Photo Gallery by PHP and put it in <a> tag. Something like this:

$gal_id = (int) $gallery[ $i ];
echo '<a href="' . esc_url( wp_get_attachment_url( $gal_id ) ) . '"</a>

but instead of wp_get_attachment_url( $gal_id ) I want my link from "link to".

0

There are 0 answers