Title: Dynamic post ID
Last modified: August 20, 2016

---

# Dynamic post ID

 *  [abozabra](https://wordpress.org/support/users/abozabra/)
 * (@abozabra)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/dynamic-post-id/)
 * Hi Guys,
 * we have a gallery with 20 posts(image plus some info below) on each gallery page.
   I am trying to use the lightbox plus so when people click on a text (quick view)
   below the image, it brings out the a larger images plus some content text) form
   it’s original post.
 * this what I am using to bring out the post id
 *     ```
       <a class="lbp-inline-link-1-<?php global $post; echo $post->ID; ?>" href="#">Quick View</a>
   
       <div style="display:none">
           <div id="lbp-inline-href-1-<?php global $post; echo $post->ID; ?>" style="padding: 10px;background: #fff">
               <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo get_post_meta($post->ID, "mainimage", $single = true); ?>&h=262&w=250&zc=1" width="262" height="250" /></a>
           </div>
       </div>
       ```
   
 * It translate to this
 * [Quick View](https://wordpress.org/support/topic/dynamic-post-id/?output_format=md#)
 * My question, how to male the class and the id of lightbox plus to be just the
   post ID number.
 * Thank You
 * Sam
 * [http://wordpress.org/extend/plugins/lightbox-plus/](http://wordpress.org/extend/plugins/lightbox-plus/)

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

 *  Thread Starter [abozabra](https://wordpress.org/support/users/abozabra/)
 * (@abozabra)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/dynamic-post-id/#post-3403574)
 * translate to this.. Sorry:
 * `<a class="lbp-inline-link-1489" href="#">Quick View</a>`
 *  Thread Starter [abozabra](https://wordpress.org/support/users/abozabra/)
 * (@abozabra)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/dynamic-post-id/#post-3403576)
 * `<a class="lbp-inline-link-1-489" href="#">Inline HTML Link Name</a>`
 * Sorry 🙂
 * Any Idea Will be much Appreciated

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

The topic ‘Dynamic post ID’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/lightbox-plus_fafafa.svg)
 * [Lightbox Plus Colorbox](https://wordpress.org/plugins/lightbox-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lightbox-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lightbox-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/lightbox-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lightbox-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lightbox-plus/reviews/)

## Tags

 * [$post->id](https://wordpress.org/support/topic-tag/post-id/)
 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)

 * 2 replies
 * 1 participant
 * Last reply from: [abozabra](https://wordpress.org/support/users/abozabra/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/dynamic-post-id/#post-3403576)
 * Status: not resolved