Attachments Display & Caching When File Not Attached to Page/Post, Updated
-
A method for refreshing EG Attachments cache for files that are not attached to a page/post is respectfully requested (if I am understanding the following).
We are continually modifying file attachments, either replacing or deleting/reuploading. We frequently use the parameters for tags and id=”-1″.
Update: Behavior is the same if “Links to Attachments” setting is either “Direct” or “File”.
Shortcode:
[attachments title="New Business Documents" titletag="H3" template=simple-icon tags="new-business" id="-1"]
Template:
<li class="attachments-small"><a title="%TITLE%" href="%URL%" %NOFOLLOW%>%ICON-16x16% %TITLE%</a> (%FILESIZE%, Updated: %DATE%)</li>
A. Scenario with Enable Media Replace
- File (tagged “new-business”) is not attached to any page/post.
- File is reuploaded via Enable Media Replace plugin.
- File updated date does not change on page display. Updated file title does not change on page refresh.
- However, when I change shortcode to the following, adding the include paramenter, display on refreshed page is updated:
[attachments title="New Business Documents" titletag="H3" template=simple-icon tags="new-business" include="1,2,3" id="-1"]
B. Simpler Scenario, File Deleted Then Re-uploaded
- Tagged file is deleted from Media Library.
- File is uploaded; file is re-tagged “new-business”.
- File is still displayed, but link does not work (WP page is simply re-loaded). File icon is “blank.”
- However, when I update shortcode to include “include=”1,2,3”, attachments display is updated, and file is successfully link again.
Thanks in advance.
- The topic ‘Attachments Display & Caching When File Not Attached to Page/Post, Updated’ is closed to new replies.