Support » Plugin: RPS Image Gallery » [Plugin: RPS Image Gallery] Pulling in Gallery Link URL for external use?

  • Resolved Brett2000

    (@brett2000)


    Hi,

    Your plugin is very useful, however I’ve got a theme using FlexSlider, instead of Gallery on my posts using a custom post type.

    That’s all good, but I’m not sure how to get Gallery Link URL for an attachment inside of the custom post code, can you tell me how I would do that?

    Here is what I tried:
    $full_img_url = get_attachment_link($attachment->ID);
    or
    $full_img_url = get_gallery_link_target ($attachment->ID);

    Neither of those will return the link and with the second, I get this error:
    ————
    Fatal error: Call to undefined function get_gallery_link_target() in /home/mywebsite/public_html/customblog/wp-content/themes/myphototheme/single-photo.php on line 49

    Can you tell me how I would get the Gallery Link URL from inside of custom post code?

    TIA,
    -Brett

    http://wordpress.org/extend/plugins/rps-image-gallery/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author redpixelstudios

    (@redpixelstudios)

    No problem Brett. RPS Image Gallery is a class, so you need to access its methods (functions) slightly differently. In order to get the Gallery Link URL for a specific attachment, you would need to use:

    $full_image_url = RPS_Image_Gallery::get_gallery_link( $attachment->ID );

    You can do something similar to access the target by calling its method like so:

    $full_image_url_target = RPS_Image_Gallery::get_gallery_link_target( $attachment->ID );

    Of course you can echo the result or set the variable names to whatever you wish. We hope that this addresses your question. Let us know how it works out for you. Thanks for using RPS Image Gallery.

    Plugin Author redpixelstudios

    (@redpixelstudios)

    We are going to go ahead and mark this as resolved since the recommended solution has been tested. Please let us know if you need any additional information.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: RPS Image Gallery] Pulling in Gallery Link URL for external use?’ is closed to new replies.