0

I have a thumbnail in wordpress, now when the thumbnail image is click, i want a modal to appear. Something just a bootstrap modal. How Can i do this? . any tutoria with this?. there are only few articles related with this. I dont want to use any plugin. I want to make a dynamic modal when my thumbnail was clicked.

1 Answer 1

0

Easiest way would be to just grab an existing modal library and enqueue that to your theme. Bootstrap would work (although it would be excessive if you only need a modal window), just enqueue your bootstraps CSS and JavaScript files in your functions.php in your child theme and then you can create the appropriate classes for your modal window. Here are the WordPress codex references on enqueuing:

Enqueue Script

Enqueue Style

1
  • can you give me example how to do it ? . I have a for example a thumbnail then linked to a modal. How can i make the modal dynamic ?. Is it thru post ? How ?
    – Jc John
    Commented Dec 6, 2016 at 6:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.