function display_archived_post_message( $content ) {
global $post;
if ( 'archived' === $post->post_status ) {
$message = __( 'This post is archived and may contain outdated information.', 'archived-post-status' );
$content = '<div class="archived-post-message">' . $message . '</div>' . $content;
}
return $content;
}
add_filter( 'the_content', 'display_archived_post_message' );
Is this something you can help me with and add to the FAQ? I’m also not sure what is used in the code for the “archived” page status. Is it ‘archived’ or something else?
Thank you for your time!
I have an archived site in multisite installation and the images are accessible with direct link from search engine.
How can I do to make these inaccesible?
Thanks
]]>Specifically:
add_action( 'wcfm_after_product_archived', function( $product_id ) {
$product = wc_get_product( $product_id );
$product->set_catalog_visibility( 'hidden' );
$product->save();
});
That is perfect!
The issue is that it’s obviously not working during the bulk edit of the products (but only when you archived a product using the specific button in the back-end gui). It’s quite hard to do that one by one if you have 1M products to be archived for example
Moreover, there is another case that is so much important:
If we configured when a vendor is disabled (for no membership renewal) all products will be archived, these products are still visible in the woocommerce list (visibility is not hidden but catalog & search).
I know that we can do it manually but a vendor can disable itself on its own, it’s very hard to intervene always manually.
Could you please provide a solution for this? Is there any kind of custom action on vendor disabled and/or product bulk edit?
Thanks a lot.
]]>So we have some products which have been Archived by shop vendors and because the Catalog Visibility it set to: Shop and Search Results when you view the vendors shop it looks like she has 1 missng product as theres a gap.
So if there a way for Archived Products inside wcfm to have Catalog Visibility set to Hidden by default?
Thanks
Aaron
Since 35% of the web uses WordPress to create web content, it would be nice if WordPress took those web content managing/archiving best practices into consideration and included an Archived status for pages and posts with such functionalities (add a notice, noindex). This would not only be useful for news and government websites, but also for some companies (ie. “This product is no longer being manufactured”).
I know a plugin was created (Archived Post Status), but it is no longer being maintained and it was not really created with these “good practices” in mind.
Here are some sources on the subject of web page archiving/removal:
Best practices from NN Group (general)
https://www.nngroup.com/articles/web-pages-must-live-forever/
Gov.uk – Withdrawing and removing content, and labelling content from previous governments
https://www.gov.uk/guidance/content-design/gov-uk-content-retention-and-withdrawal-archiving-policy
Canada.ca – Managing and Archiving Web Content
https://www.canada.ca/en/government/system/digital-government/modern-emerging-technologies/information-management/managing-archiving-web-content.html
Thank you!
]]>[front-end-pm fep-filter="inbox"]
.Is it as simple as editing line 487 of class-plugin-activation-status.php with something like this (within the get_blogs() function)?
return $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs} WHERE archived <> 1 ORDER BY blog_id" );
I’ve just Archived around 5600 sites on my multisite. I suspect that many of those sites were the only ones using several (now abandoned) plugins.
]]>I have several archived blogs and it would be great if there were a way to see something on the “Active In” column that in some way distinguished these from the others.
One thought is to have a “strike-though” on just the names of the archived blogs. It would still let us know the plugin/theme was active there, but there might be less urgency to deal with it as this blog isn’t online.
What do you think?
]]>I’d like to have a page where all past events show up. So, is there a shortcode that displays all past events, no matter from what month or year?
This one for example only shows from the past events from the current year:
[chronosly type="category" year="past"]
Maybe something like this to show all past events from the past 5 years:
[chronosly type="category" year="past_5"]
I’d also like to have an option that displays a certain number of past events per page. Could look like this e.g.:
[chronosly type="category" year="past_5" max="25"]
Or are there shortcodes for all this already and I just don’t find them?
Thanks!