WordPress.org

Ready to get started?Download WordPress

Forums

Arconix Portfolio
[resolved] Jquery not working after Duplication (4 posts)

  1. atalsma
    Member
    Posted 2 years ago #

    After duplicating the plugin to make Portfolio and Experience, the jquery no longer functions unless one is deactivated.

    I tried removing the .js files from one plugin but it didnt seem to help. I looked up similar issues online and it seems maybe there is someway to adapt one plugin's code to not create a unique ID conflict? Hopefully nothing major..

    Thanks

    http://wordpress.org/extend/plugins/arconix-portfolio/

  2. John Gardner
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm... I don't use any static id's (the only ID I call is the post ID, which will never conflict), so there shouldn't be that kind of conflict. What might be conflicting is either how the javascript gets registered in the plugin, or the javascript itself is conflicting.

    You noted previously that you changed the instances of "portfolio" to "experiences". Did you do that across all files? Did you also do things like rename the ACP_URL and ACP_Version variables?

  3. atalsma
    Member
    Posted 2 years ago #

    You were right - the ACP_URL and ACP_Version variables needed to be changed. Now it works great.

    For learnings sake, why are the variables defined as below? You could either point me to some guide that describes it in detail, otherwise a brief description about why each part is written as it is. (for instance why 1.1.1? why ACP?
    define( 'ACP_URL', plugin_dir_url( __FILE__ ) );
    define( 'ACP_Version', '1.1.1' );

    thanks again!

  4. John Gardner
    Member
    Plugin Author

    Posted 2 years ago #

    I defined those variables so that it saves me time elsewhere in the code.

    'ACP' is just an acronym I used for my portfolio plugin (Arconix Computers Portfolio). I use the acronym so that it doesn't conflict with other variables that may exist.

    ACP_URL is used as a quick reference for the URL of the plugin. I use that in a number of places.

    ACP_Version is the plugin version. I use that primarily when registering scripts so I don't have to change that script version every time I update the plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.