Forums

[Plugin: Contact Form 7] if having different plugins path (4 posts)

  1. Tavy315
    Member
    Posted 1 month ago #

    Looking into /contact-form-7/admin/wpcf7-admin.js file, there is:

    var dropdown_icon = jQuery('<img src="../wp-content/plugins/contact-form-7/images/dropdown.gif" />');

    which doesn't work if having a different path for plugins directory. I had to manually modify to:

    var dropdown_icon = jQuery('<img src="../plugins/contact-form-7/images/dropdown.gif" />');

    in order to work for me, as I have website.tld/plugins/ instead of website.tld/wp-content/plugins/. Anyway to correct this so I wouldn't have to modify the code everytime I update Contact Form 7 ?

    Thanks,
    Octav

  2. stvwlf
    Member
    Posted 1 month ago #

    If you leave the plugin folder where WordPress expects to find it you won't have that problem. Its not the only plugin expecting its files to be in the plugin folder designated by WP.

    That is the best way correct this so you wouldn't have to modify the code everytime you update Contact Form 7.

  3. takayukister
    Member
    Posted 1 month ago #

    Thanks. I'll fix it.

  4. Tavy315
    Member
    Posted 1 month ago #

    @stvwlf: You can define the plugin dir in config.php as follows:
    define( 'WP_PLUGIN_DIR', ABSPATH . '/plugins' );
    So why not to use that? Looks better on my website...

    @takayukister: thanks for replying.

Reply

You must log in to post.

About this Topic