unable to open post information dynamicaly in modal box in wordpress and twitter bootstrap -
i'm working on wordpress twitter bootstrap theme. @ home page want grid of images of posts(featured images) , when clicked on them info of post open modal box. i'm using display post shortcode wordpress plugin display featured image of posts on home page.but problem m using advanced custom fields 4.2.2 wordpress plugin wp user frontend: custom fields info of every post every post has own custom fields year of passing *course name* course type , email want display these info in modal box when user click on image @ home page. in display post shortcode line display image link shown as:
$image = '<a class="image" href="' . get_permalink() . '">' . get_the_post_thumbnail( $post->id, $image_size ) . '</a> ';
so have change open modal as:
$image = '<a class="image" data-toggle="modal" data-target="#<?php echo $id;?>" href="#">' . get_the_post_thumbnail( $post->id, $image_size ) . '</a> ';
i have made template display featured images posts as:
<?php /** _full_width_history.php * * template name: full width history * * @author konstantin obenland * @package bootstrap * @since 1.3.0 - 29.04.2012 */ get_header(); ?> <section id="primary" class="span12"> <?php echo do_shortcode('[display-posts category="uncategorized" image_size="thumbnail" posts_per_page="100000"]'); ?> <div class="modal hide fade modal_width" id="mymodal" tabindex="-9" role="dialog"> <div class="modal-body"><button class="close well" type="button" data-dismiss="modal">×</button><br/> </div></div> <?php tha_content_before(); ?> <div id="content" role="main"> <?php tha_content_top(); the_post(); get_template_part( '/partials/content', 'page' ); comments_template( '', true ); tha_content_bottom(); ?> </div><!-- #content --> <?php tha_content_after(); ?> </section><!-- #primary --> <?php get_footer(); /* end of file _full_width_history.php */ /* location: ./wp-content/themes/the-bootstrap/_full_width_history.php */
now how can achieve please me guys
Comments
Post a Comment