Title: modal post &#8211; trying various methods
Last modified: May 28, 2017

---

# modal post – trying various methods

 *  Resolved [willcitizen](https://wordpress.org/support/users/willcitizen/)
 * (@willcitizen)
 * [9 years ago](https://wordpress.org/support/topic/modal-post-trying-various-methods/)
 * Premium User:
 * I need to open a modal with post content from a read more button. Trying various
   methods.
 * One option I have is to append a modal-link class to the url which I wanted to
   do with jquery, but I cannot get any code added in the custom JS block to run
   when my grid is loaded.

Viewing 1 replies (of 1 total)

 *  Plugin Author [PickPlugins](https://wordpress.org/support/users/pickplugins/)
 * (@pickplugins)
 * [9 years ago](https://wordpress.org/support/topic/modal-post-trying-various-methods/#post-9175329)
 * Thanks for your post.
 * Can you please send me your demo link where you are trying?
    I am not sure how
   you are trying by clicking on read more button. that button doesn’t contain any
   post id attribute, so read more button may not work properly.
 * another solution you may try, create a shortcode that will generate custom read
   more button, you need to use that shortcode under layout editor
 *     ```
       function custom_read_more(){
   
       return '<a class="modal-read-more" href="#" post_id="'.get_the_id().'">Read more</a>';
       }
   
       add_shortcode('custom_read_more','custom_read_more');
       ```
   
 * yuo will need to use post id on ajax call.
 * > [View post on imgur.com](https://imgur.com/a/BJVK5)
 * I hope that will hep you.
 * Also please note, use our official forum for premium support.
 * Regards

Viewing 1 replies (of 1 total)

The topic ‘modal post – trying various methods’ is closed to new replies.

 * ![](https://ps.w.org/post-grid/assets/icon-256x256.gif?rev=3295086)
 * [Post Grid](https://wordpress.org/plugins/post-grid/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-grid/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-grid/)
 * [Active Topics](https://wordpress.org/support/plugin/post-grid/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-grid/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-grid/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [PickPlugins](https://wordpress.org/support/users/pickplugins/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/modal-post-trying-various-methods/#post-9175329)
 * Status: resolved