WordPress.org

Ready to get started?Download WordPress

Forums

How to add js only when widget contains a special shortcod (1 post)

  1. Ameisenman
    Member
    Posted 3 years ago #

    Hi everybody,
    I need a solution for having a problem with widgets, shortcodes and javascript. I use the normal text widget in my sidebar which can display different shortcodes. What I cannot figure out how I can add a javascript only if there is the shortcode inside the widget?

    For getting this to work if a shortcode is inside the post content isn't the problem, but how can I do it with widget's content?

    Thanx in advance!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.