Support » Plugin: Custom Post Type Attachment » Fix cpta_get_file_url function

  • Hi, in your functions.php file you must fix the cpta_get_file_url function. You are sending a bad URL.

    Please change line 14 from this:
    return $upload_dir['baseurl'].$file_path;

    to this:
    return $file_path;

    Kind regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thank you, this provides a working solution to the broken links this plugin is now outputting.

    Developer please fix!

    Unfortunately this fixes old links, but seems to break new links.

    Old link with this solution (correct):

    https://www.somedomain.com/wp-content/uploads/2020/02/name_of_file.pdf

    Newly uploaded file link with this solution (broken):

    https://www.somedomain.com/2020/03/name_of_new_file.pdf

    You can see that the wp-content/uploads/ is not making it into the new links.

    Any ideas dev?

    Plugin Author aviplugins.com

    (@avimegladon)

    Please update the plugin to the latest version and deactivate and reactivate the plugin once after update. The issue should be fixed.

    seizart

    (@seizart)

    please fix issue, it on t work with new update

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fix cpta_get_file_url function’ is closed to new replies.