<a rel="lightbox" href="https://wordpress.stackexchange.com/questions/10191/<?php $image_id = get_post_thumbnail_id();
$image_url = wp_get_attachment_image_src($image_id,"large', true);
echo $image_url[0]; ?>">
<?php the_post_thumbnail('thumbnail'); ?>
</a>
Yeah the above (posted by @null) is correct on getting the url, here it is all put together. Including the rel=lightbox. I call to WP’s large image size here personally for the lightbox image to be linked to.
the_post_thumbnail
wp_get_attachment_image_src
Related Posts:
- How to insert multiple images into a single post within a CPT
- Custom Post Type with image gallery
- Not Able to Get Custom Post Type Gallery Images URL
- How to add multiple images to a custom post type without plugin [closed]
- Getting Un Wanted Gallery Shortcode In The Page on Loop
- Not Able to Add New Class To CPT Attachment Image
- Links Image in “Catalog” Page to Posts
- How can I detect a chosen Isotope layout option from within Javascript to generate appropriate layout?
- What’s the difference between same wp functions get_posts(); functions in different form?
- One-to-many post relationships that are displayed by category (using posts-to-posts plugin)
- How to move image thumbnails into custom folder for custom post type
- What template files do I need to customise custom-category-term-links rather than fall back on archive.php?
- uploading images to specified directories
- Get image post ID in media upload
- Get term name and term parent into custom post type permalink
- Link to full size post thumbnail
- Hide editor while keeping add media button in custom post type
- Multiple featured sizes / images / excerpts
- How can i add thumbnails images to particular post (using code not admin pannel) in wordpress
- How to Create an Image Upload Box for Custom Posts?
- Allow non-logged in users to see a future post after clicking on a list of future posts
- attachment.php code or tutorial
- Help need making decision. Ads rotating site on wordpress
- Query & Order posts by custom fields
- custom taxonamy and post type
- What is the recommended / best way to do this: Event calendar post/type in a block-based theme?
- Add custom image size for custom post type or taxonomy
- Return the latest post from a custom Taxonomy and Post Type
- Don’t know how to show custom taxonomies from a custom post_type
- How to automatically set ‘default image size’ for specific Custom Post Type
- JS innerhtml changing style when using AJAX
- Display a grid of taxonomy terms at root taxonomy page
- How to Upload CSV Data into Custom Post Type Data with Metabox programmatically
- How to change the post type a theme shows by default?
- Get unique superset of taxonomy terms from a list of custom posts in another hierarchical taxonomy
- How to create a gallery page with categories?
- Event Custom Post Type Title show by upcoming Event Dates
- How to have this permalink structure: post_type/postname/custom_inner_page
- Problem: wp_query outputs all images on site
- Building a Treatments Page, What Do I Use?
- Problems with image size on the server WordPress
- frontend image post uploader
- Custom post types and category archive
- Adding custom image sizes and post types to a plugin or to a theme?
- custom comments form for custom post type
- How to produce a sub-page-system in WordPress
- Can anyone help me with galleries and post types?
- How to handle large number of images in a post?
- WebP Fallback for Inline Background Image in Style Attribute
- How do you get the full size url of an attachment image
- How to specify a template for a path like http://example.com/something?
- Redirect to another page using contact form 7? [closed]
- Warning: Invalid argument supplied for foreach() [closed]
- Gallery thumbnails very small
- Custom post type isn’t working
- Warning: Invalid argument supplied for foreach() in post.php [closed]
- Creating my own portfolio custom-type
- i cant see the max_num_pages of a custom wp query
- Archieve.php not loading for custom post type
- detect your custom post type in WordPress
- Display custom post using ID
- Editor / Add Media: Is it possible to only allow galleries?
- Custom WP_Query doesn’t display all posts
- How to show a manageable list of images on a post?
- Specify a particular page to list all custom types
- WordPress app page not found error for posts with hyphen in permalink
- Where is the sticky post option?
- Two column layout with alphabetical ordering
- Create a comments template for custom post types
- Is it possible to add posts and images (auto resize) for custom post types with a script?
- Custom post type permalink sends to 404.php
- WP_Query with custom post type ID
- Api rest_route 404 while building filter for custom posts (filtered by multiple meta keys / custom fields)
- how to get this tax_query working?
- Show Taxonomies with admin area for custom post type?
- Pagination doesnt work in custom post type
- Archive links for custom post types
- Include custom post type custom taxonomies in Categories widget
- Template Hierarchy for custom post type pages
- Should Custom post types and fields be in the theme files or in a custom plugin packed into the theme?
- How do you output an unknown number of images in a custom post type with desired markup?
- Custom post type’s posts are not showing anywere but in xml sitemap
- copy images from custom field to another custom field
- How to Use Custom Meta Field Instead of CPT Title in Post URL
- Separate Content from gallery (custom post type)
- Assign a template to a custom post type when displayed by the main loop on the home page
- Custom Post type content within a slider
- If Post type use sidebar (‘tree’)
- Using Image Sizes for Custom Post Types outside the Loop
- link featured image to external link
- Methods for development wordpress themes [closed]
- Custom Post Type – after disable ‘Add New’, I can’t edit and delete post
- How to Organize and Sort Gallery of Images
- Having Issue on Getting Metabox Checkbox Value
- Searching post types
- Custom meta box in custom post type not working
- Add admin script to several post types
- Why does my URL keep returning 404 error code?
- Thumbnails Not Generating
- Make Next and Previous on single-$posttype.php use the same order as archive-$posttype.php