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):

    Newly uploaded file link with this solution (broken):

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

    Any ideas dev?

    Plugin Author


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



    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.