• Resolved Kandice

    (@khutcheson)


    Is there a way to set an absolute URL path for the assets folder with a filter/hook or other method? Because of a renaming issue with the site, the icons for the tables (chevrons in pagination, etc) are not showing up, everything else works. The icons/fonts are trying to be pulled from the relative URL, which after renaming does not exist.

    Say the natural URL is sub.domain.com/wp-content/plugins/wpdatatables/assets/, then the URL gets renamed to https://www.domain. com/sitefolder/wp-content/plugins/wpdatatables/assets/. I need an option to set assets/fonts to pull from sub.domain.com instead of the relative url of /sitefolder/wp-content/…/.

    Any help is greatly appreciated!

    • This topic was modified 2 years, 10 months ago by Kandice.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wpDataTables

    (@wpdatatables)

    Hello Kandice.

    Sorry for the late response.

    If we understood correctly, this is not something that can be modified with wpDataTables, since we’re loading the files based on WordPress functions that return the path to our plugin.

    wpDataTables is not aware if it’s a sub.domain or domain, but WP is returning the path to the plugins folder on the server level.

    The only solution would be to hard-code this in the plugin’s code but this is a custom solution, and you’d need to do this every time the plugin updates since the changes will be overwritten with every update.

    The logic of including files is located in wp-content/plugins/wpdatatables/controllers/wdt_admin.php file and you can search for the exact file that you need, and hard code it in there.

    We hope this helps.

    Thread Starter Kandice

    (@khutcheson)

    Thank you. This is actually perfect. I should be able to use this to find an alternative solution to including the files.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Absolute URL for Assets Folder’ is closed to new replies.