The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
How to modify the l...
 
Share:
Notifications
Clear all

[Solved] How to modify the location of wpDiscuz attachments.

1 Posts
1 Users
1 Reactions
14.5 K Views
Asti
 Asti
(@asti)
Illustrious Member Support
Joined: 8 years ago
Posts: 8208
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
  [#8747]

Starting from wpDiscuz version 7.6.20, you can modify the location of wpDiscuz attachments using the wpdiscuz_uploads_folder hook. 

The code snippet below allows you to create a new folder within the '/uploads' directory, where all wpDiscuz attachments will be stored:

add_filter("wpdiscuz_uploads_folder", function ($dir) {
    $dir  = "wpdiscuz_uploads";
    return $dir;
});

Insert this hook code into the functions.php file of your active WordPress theme. For more information on how to add custom code, refer to this guide: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/

Important: This code will only affect new attachments. Previously inserted images will not display on the frontend because the path has already changed. To resolve this issue, you'll need to update the existing attachment paths in the database.

We strongly recommend backing up your database tables before making any changes.

If you’re not familiar with database structure and are unable to change the paths yourself, we recommend contacting paid plugin customization and custom addon development services through the gVectors Team. They can assess the work and create the necessary changes for you. Just contact us via sales[at]gvectors.com email address and send a list of requirements you'd like to have.


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.


   
Jacob reacted
Share: