You could use WordPress’ built-in Thickbox script. Just place the following code somewhere before wp_footer();
:
add_action( 'wp_footer', 't5_thickbox_jquery' );
function t5_thickbox_jquery()
{
?>
<script>
jQuery( 'a img.size-medium, a img.attachment-thumbnail' )
.parent()
.addClass( 'thickbox' )
.attr( 'rel', 'page' );
</script>
<?php
add_thickbox();
}
See this answer for more details.
Related Posts:
- How to use a custom post type archive as front page?
- Set posts of a custom post type to be private by default?
- clients list using wordpress
- expire wordpress user posts
- Forcing all posts associated with a custom post type to be private
- Date archives for custom post type
- Detect meta value changes when post is updated (post_updated)
- Search everything (posts, pages, tags, cpt, meta)
- How to Removing fields from the Media Uploader/Gallery on a Custom Post Type Edit Page
- Best way to style first post differently?
- if && problems with transition_post_status
- custom post type upcoming post and past post
- Add multiple custom post types in functions.php, but only one custom post type show in dashboard
- Beginner question: Accessing functions.php through admin web interface in order to import custom post types?
- Append taxonomy terms as class names in markup?
- Post the content of a specific “Custom Post Type” post within a post using a shortcode
- Need functionality with all post list available at edit.php
- Remove default post types on all sites except primary blog. WPMU
- How would I create a shortcode to display a custom post within a page or regular post?
- GravityForm: Populate Dropdown with custom post type [closed]
- Custom Post Types relationships
- Filter categories of posts with checkboxes
- Copy custom field value to post title
- Insert HTML inside link in a walker
- Custom Taxonomy Permalinks Redirection
- Add custom column in custom post type edit page
- Remove standard meta boxes from custom taxonomy
- What’s the difference between same wp functions get_posts(); functions in different form?
- custom post type not showing in menu
- Show category ID on custom post type
- Custom Post Type with Templates using Meta Boxes?
- Can I list a custom post type within another custom post type in the admin area?
- Set URL link to featured image of custom post type
- AJAX load more for different custom post type loops
- On update or create post redirect to current post position in list
- I need to add endpoint for wordpress categories
- Featured image overlay when changing post status
- create a new page from a custom post type similar to an authors page
- Hide a widget inside a div on specific type of post
- Cannot save CPT meta box
- next_/previous_post_link() `in_same_category` appears to fail when true
- Want to be able to sign up subscribers as authors
- Warning: Invalid argument supplied for foreach() [closed]
- Custom post type isn’t working
- categories should be available across all custom post types
- Warning: Invalid argument supplied for foreach() in post.php [closed]
- Post-thumbnail only for specific post-types?
- Custom Post Type & Custom Menu Walker to append custom class for active post types
- Enable taxonomies by post type in an array of CPTs
- custom post for slider
- Excerpt function for any content
- Page Template Dropdown For Custom Post Types
- How exclude or skip post type with get_next_post_link
- Create short URL with auto 301 redirect
- providing access to post_id or post inside functions.php
- Run shortcode in custom script in wp_head if post type is CPT ‘Jobs’
- Get post format
- post_content is stripping HTML when adding a new post? [closed]
- Shortcode to return single custom post based on post taxonomy
- Template code to split a post and print a custom field?
- Send post changes to set email addresses (not users or subscribers)
- Twitter Product Cards
- Function to limit number of custom post types on homepage – TwentyTen
- Foreach loop returning more than one item when querying taxonomy
- Post visibility option to theme front-end for author to select?
- Excerpt length: get first paragraph
- display custom portfolio tags
- display custom post on separate page
- Post type Echo code is repeating on homepage
- Submit Custom Postypes from frontend
- Need help with Custom Post Types and Taxonomies
- new post-type how do i retain the plugins on my sidebar?
- Custom Post Type Dashboard Tab not displaying any posts
- Title and URL Error in Breadcrumb Navigation for Custom Post Types
- Assigning categories to custom post types via a front-end form; only works for native post type
- Default excerpt for parent of a custom post type
- Move to trash custom post type post after ACF Date Picker date is older than today
- From CPT Custom Loop into Shortcode?
- Create posts inside CPT post
- Load custom post type with ID in a shortcode
- How to assign post to category
- Using get_post_type with a custom URL format?
- If thumbnail image else post title
- $_SESSION Not working after X amount of page views
- Different Configuration for the_excerpt()
- WordPress page not showing up – replaced with last 10 posts?
- Post that populates itself (almost) automatically using data from imported excel file
- How to mark posts as visited
- Populate custom post type/custom fields from an external database
- Work and Display a Custom Post Type as a normal Post
- Custom Field to post_title
- Post Custom & Taxonomy 404 error
- How To Display Category list from Portfolio post type plugin?
- can’t see categories in appearance-menu-categories
- send email to all registered users when post expires
- Allow authors to create article image
- Comments are not working on Custom Post Type
- How to make a non-public post on wordpress approval?
- add_rewrite_rule not working with custom post type
- I want to show a list of post with title that have link goes to that post and icon under the specific category to which it belongs