addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrosseditemptyheartfacebookfolderfullheartglobegmailgoogleimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

Arizona WordPress Group Message Board › Modifying plugin using jQuery

Modifying plugin using jQuery

A former member
Post #: 69
While I don't use a lot of plugins in the sites I develop, I do use a few. Occasionally, I need to make minor modifications to the HTML structure of some of the view pages provided by the plugin (e.g. adding a wrapping div in a product page on an ecommerce plugin).

Obviously, making changes directly to the plugin files creates problems down the line when/if the plugin is updated. And saving the modified plugin as something else means the site doesn't benefit from plugin updates.

So I was thinking about using jQuery to make the changes on the fly ( e.g. $('#element').html('<div class="wrapper">');).

Has anyone else done this? Is there a better approach you've found?

Peace out,
Kyle T.
Chandler, AZ
Post #: 9
For me personally, it depends on a lot of factors:

  • Can I make my own plugin do this quickly?
  • Are the updates could be security related (as opposed to say a simple plugin to list a CPT or something)
  • How much markup do I need to change?

Generally, I'd avoid the jQuery method, but you really have to weigh all the factors. Usually I write it myself, but that's not always an option.
Powered by mvnForum

Our Sponsors

  • Gangplank

    Thank you to Gangplank for allowing us to use their meeting space.

  • WP Engine

    Premium Managed WordPress Hosting

  • Headway Themes

    Thank you to Headway Themes for assistance with meeting space

  • Skyhook Internet Marketing

    Special thanks to Skyhook for sponsoring the AZ WordPress Birthday Party

  • Rock It Boot Camp

    Technology-based training programs to meet the needs of employers.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy