WordPress.org

Ready to get started?Download WordPress

Forums

Alligator Popup
[resolved] conflict with Avada Theme (5 posts)

  1. daniellesalvacion
    Member
    Posted 8 months ago #

    Hi, I could not get the plugin to work because there is a conflict with the Avada Theme's 'popup' class.

    I've read that we could change the class name for Alligator Popup but I don't know how. Can anyone help?

    http://wordpress.org/plugins/alligator-popup/

  2. cubecolour
    ɹoʇɐɹǝpoɯ
    Plugin Author

    Posted 8 months ago #

    Where did you read that?

    As you are using a commercial theme I have no access to its code, so I cannot inspect the code to see how it is conflicting with Alligator Popup. I would suggest you contact your theme vendor to ask how to deactivate whatever built-in popup feature in the theme is interfering with the plugin.

    My best guess for a workaround for this is to hack the Alligator Popup plugin to change the class used to trigger the popup, but be aware that any changes made will be overwritten on the next plugin update unless you rename the plugin to prevent it being updated.

    To do this, substitute the word 'popup' with a unique class name in:

    line 69 of alligator-popup.php:

    return '<a href="' . esc_attr($url) . '" class="popup" data-width="' . esc_attr($width) . '" data-height="' . esc_attr($height) . '">' . $content . '</a>';

    & line 3 of js/popup.js:

    $('.popup').click(function() {
  3. daniellesalvacion
    Member
    Posted 8 months ago #

    I read from one of the reviews. Changing the class name works. Thanks!

    I'll have to use this fix until I could contact our Theme Vendor.

    Great Plugin! Thanks again!

  4. babs_UK
    Member
    Posted 2 months ago #

    Ignore - sorry!

  5. cubecolour
    ɹoʇɐɹǝpoɯ
    Plugin Author

    Posted 2 months ago #

    In the current version (1.1.0) of alligator popup, the 'popup' class is now defined in Line 110 of alligator-popup.php
    This class is still targeted in line 3 of popup.js you would need to change both values if you need to change the class. You also need to take care when updating.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.