• Resolved malibumarlin

    (@malibumarlin)


    Thank you for this plug-in. It is exactly what I need, unfortunately it’s not functioning as hoped for. The plugin itself installed and works as far as being able to insert a custom link, but perhaps my theme, or more specifically, the widget i wish it to work with isn’t.

    The widget My-Post-Cycle has this bit of code where ‘get img URL’, and I think this is where i need to integrate your plugin function instead, I’m just not certain what to replace it with from your plugin to make it work as intended:

    <?php if(has_post_thumbnail()) { ?>
    <?php
    $thumb = get_post_thumbnail_id();
    $img_url = wp_get_attachment_url( $thumb,'full'); //get img URL
    $image = aq_resize( $img_url, 220, 120, true ); //r										esize & crop img
    ?>

    My site info:
    WP 3.5
    Template Monster Theme #41207
    URL to my install: https://www.MalibuLivingNow.com
    The area I am hoping to utilize your plugin in is the Before content region which reads in bold type “Malibu Living Now” – there are 4 posts across with a featured image and an excerpt. All i wish to do is have each featured image link to the respective page of posts on the site, not the post of the featured image.

    https://www.ads-software.com/extend/plugins/wp-gallery-custom-links/

Viewing 3 replies - 1 through 3 (of 3 total)
  • That’s sort of outside the scope of what the plugin was designed to do, since you’re not actually using the [gallery] shortcode. However, since the plugin saves the custom url as a meta field for the image, and it looks like you’re already getting the ID of the thumbnail, you could try replacing:

    $img_url = wp_get_attachment_url( $thumb,'full'); //get img URL

    with:

    $img_url = get_post_meta( $thumb, '_gallery_link_url', true );

    I haven’t tested this code or anything, but hopefully it will at least get you started. Good luck!

    Thread Starter malibumarlin

    (@malibumarlin)

    Thank you for the input. I gave it a try, and it’s going to need some work. For now, I found another solution to accomplish the main goal. Your plug-in is a big help, and it works. Thanks again!!

    glad you got it working one way or another ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_get_attachement-URL // get img URL’ is closed to new replies.