Depends on what you mean by “content”. If you just want to remove the post body then…
function remove_body_wpse_97291($content) {
return "Content temporarily removed";
}
add_filter('the_content','remove_body_wpse_97291',100);
If you want more aggressive content removal…
function remove_all_content_wpse_97291($content) {
include('license.txt'); // example loads the WordPress license agreement as raw text; not pretty
exit;
}
add_filter('template_redirect','remove_all_content_wpse_97291',1);
The URLs stay the same but you replace content.
You could also redirect with (maybe) a 307 Status code, or 302 possibly,…
function redirect_all_content_wpse_97291($content) {
wp_safe_redirect('license.txt',307);
exit;
}
add_filter('template_redirect','redirect_all_content_wpse_97291',1);
Related Posts:
- Woocommerce Add Variation Product to Cart from custom link [closed]
- Plugin to restrict non-admin user to existing tags
- What are these entries in the database? Looks similar to JSON
- Inherit plugin settings to new site in Multisite
- Add content to /wp-admin/plugin-install.php admin screens
- How to make sure a wp-cron job runs
- Need a function for changing saved post_date or post_date_gmt to relative time in wordpress
- Two embedded gallery in one post
- Open external links in a new window
- How can I change my javascript after it has been enqueued? [closed]
- Can’t use /wp-json/wp/v2/plugins API endpoint even as administrator
- Can plugins become obsolete?
- Customize the Sorting Dropdown in WooCommerce
- Multisite: Activate plugin for subsites only?
- How to filter content post only on save
- Good website screenshot plugin [closed]
- Capitalize All Titles and Headlines in Chicago Style
- I am trying to match the wpallimport using the Xpath Filter
- Showing Co-Authors on post page
- How do I store information in a dynamic block in WordPress?
- Cannot upload All-in-One WP Migration file to WordPress hangs at 28%
- Plugin custom Action Hook not working
- Shortcode doesn’t work if I directly paste its function in a template file?
- How to enqueue a theme style-sheet to my admin settings page?
- How to get the HTML until ?
- How to generate video out of images via WordPress plugin
- How to include a file for admin and 2 pages without being loaded on other parts of the site?
- Is there a hook that is called only once after plugin bulk update process is completed?
- Events Made Easy Plugin – Duplicate Title Tags
- How to send mail to subscribers using wp_mail
- Doubt using $wpbd->get_col for a single column
- Can’t Update, Delete, install Plugin
- Get plugin option in another PHP file
- NGiNX + PHP5-fpm + CDN Tools (plugin) [closed]
- Snippets: is it better to add them in functions.php or make site-specific plugins?
- Time consuming callbacks in customizer
- How can I add hyperlink in WP_Error message?
- Output content to the_content before a plugin does
- In the archive widget, how do I sort in between two years?
- Is there a hook to Intercept al urls from a webpage and redirect to a page
- Set plugin-values when creating post via REST-API
- Active class not working on page created by plugin wordpress
- Overriding Parent Theme… will cause plugins failure?
- Is there a way to figure out which action/filter invoked a function?
- Disabling plugin but wpenqueue is not available
- WP-TweetButton is not displaying the tweet button if this is set to “Manual.” [closed]
- Allow customers to download updated versions of software
- How to extract data from ‘edit my profile’ page in WordPress?
- Need to show featured service boxes on my company website
- Plugin retrieving results even after uninstallation
- Edit / Change Jetpack Mobile Theme [closed]
- Are links allowed in the Upgrade Notice section of a plugin’s readme.txt file?
- How to set category correctly for a custom post created by a remote API call?
- Translation issue with global variables
- How to redirect non www to www? [closed]
- The correct way to handle GET or POST requests in the admin panel
- Object Caching Plugin force every plugin to cache objects?
- How to find the Registration page
- How to add category and subcategory in WordPress custom code?
- Plugin not working locally, but works on server
- Conditional custom redirect
- Minimalistic schedular
- Using a Plugin to Show/Hide Content after Header?
- FacetWP breaks jQuery events
- Getting infinite scrolling working on my custom template
- Filter Content on Ultimate Membership plugin based on the Country Field Form
- How do I display PHP file contents on front end of WordPress?
- How to apply to hide TinyMCE (wp_editor) on button click
- RSS feeds for specific topics
- ob_end_flush(): failed to send buffer of zlib output compression (0) in external php
- Facing Problem with admin-ajax.php URL – Getting 404 with AJAX call
- How to send the featured image of a post to an API?
- jQuery Ajax not loading page with ACF fields
- How can I translate something in my class constructor of my plugin in WordPress?
- Which post/page an image is attached to
- Theme that includes a “core” plugin but the files in theme and child folder ignored
- Woocommerce Attribute price for non-variations
- My wp database has been hacked
- Custom Plugin Update
- How to create different views for different user roles?
- How can I disable access to plugin settings in wp admin for other roles
- Searchable Semi Random Number Generator on User Profiles
- Change hook to add_action in a plugin class
- Renamed plugin folder and when I changed back nothing was activated
- Tortoise SVN showing ‘Access to ‘/!svn/me” forbidden error.
- Customize CSS for “Swipebox ” lightbox
- Cannot pass variable to page definition
- Best use adding user generated JS/CSS to a theme with a plugin
- How to create an uploads subfolder on a multisite setup?
- API Functions to Register and Show WordPress List Tables
- Multiple level shortcodes
- Getting error of unexpected output during activation
- Jquery UI implementation [closed]
- Wanted: PayPal plugin for WordPress [closed]
- Simple Amazon Affiliate Plugin [closed]
- Why haven’t I see plugins using get_file_data to handle retrieving plugin version?
- How can I make my plugin detect if a certain theme is active?
- I start to make custom plugin but for some reason is not working, i get no error. Can someone help me? Thanks
- Is there a membership plugin which offers the ability to hide content based on css rules?
- How to add an active state class to my info box