• Resolved willcitizen

    (@willcitizen)


    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

    (@pickplugins)

    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

    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.