Skip to content

Instantly share code, notes, and snippets.

@yuriinalivaiko
Last active February 25, 2025 21:09
Show Gist options
  • Save yuriinalivaiko/b1dc305b1a821853663c408ddd8eed9a to your computer and use it in GitHub Desktop.
Save yuriinalivaiko/b1dc305b1a821853663c408ddd8eed9a to your computer and use it in GitHub Desktop.
Code snippets for the "Social Activity" extension
@yuriinalivaiko
Copy link
Author

yuriinalivaiko commented Dec 6, 2024

Images in the activity posts may work wrong if rewrite rules on your website are misconfigured or if your server firewall blocks image URLs.

Go to wp-admin > Settings > Permalinks. Don’t change settings on this page, just update. WordPress will update rewrite rules on your website.

Follow recommendations in this article if you use the Nginx web server: NGINX Configuration Rewrite Rule for Ultimate Member Social Activity. Verify settings for the ModSecurity (WAF) module if this module is installed on the server. Make sure that these URLs are allowed:

URL structure: http://{domain}/um-activity-download/{post_id}/{author_id}/{verify_key}/{image}
Example: http://um.loc/um-activity-download/2906/29/65933a9946/1709136141.jpg

As a temporary solution you can use a code snippet to change the URL structure for images. Select the solution that best suits you:

You can add code snippet to the functions.php file in the theme directory or using a special plugin like Code Snippets or WPCode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment