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:
- Does WP delete deprecated plugin/theme files on plugin/theme upgrade?
- How can I remove the WordPress-Version (?ver=5.x) from my plugin
- How to check if a taxonomy not exists in a plugin
- Settings API saved values not getting shown in the dropdownbox
- How passing values to construct function with Actions?
- What is the best way for showing a grid of customer logos?
- correct validate and sql query
- Is there any way to make myself an admin?
- wordpress add_action() issue in ajax call
- WordPress plugin won’t show on some themes
- Turning on output buffering in a wordpress plugin
- Is there a plugin for uploading files such as PDF files?
- Register google jquery gets overwritten by plugin
- How to handle forms from sidebar widgets – Processing $_POST variables using get_field_name()
- Measure and limit file uploads
- Location dependent rendering of locations? [closed]
- Why Does The `auto_update_plugin` Hook Disable Management?
- get_comments_number() giving wrong results! What are alternatives?
- $pages = get_pages(‘child_of=’.$post->ID); Why arguments are concatenated?
- Is there a script to collect all hooks and filters provided by a plugin?
- Change in one place the data about the company, which are placed on several pages
- Set up functions to be overridden without using function_exists() by short-circuiting them?
- WP RSS Aggregator plugins breaks after switch to HTTPS
- Post status doesn’t update to ‘future’ every time?
- wp_trash_post hook – problem with page updating if using wp_die
- Unable to give correct path in wordpress
- Disable variations on woo commerce if out of stock
- Add wordpress user database on android app
- Grab ID from post from plugin and use it to create an object
- Enqueue script: link not working in page source
- How to add img into a plugin?
- Help with a function in a widget
- Is wp_deregister_script the best way to deal with unneeded plugins in a page?
- Form Plugin for Api Requests which is used via Shortcode
- PHP mobile redirect Endless loop
- Error: Can´t access facebook comment plugin admin page
- Calendar for irregular recurring events [closed]
- Using plugin_dir_path() with WordPress on MAMP
- I’m looking for a plugin to execute a specific task a certain time
- jQuery gallery plugin to interface with Picasa
- Looking for a photo gallery plugin [closed]
- Get Page URI for QR Code PHP [closed]
- How do I allow users to supply a photo/image to be used instead of the grey/white silhouette?
- In a WPMU that uses several different domains, how to enable users to register subdomains of any domain from the main site?
- Woo-commerce Update price as a Bulk from My offline software export
- co-authors plugin – inline listing
- Open_basedir errors – But setting basedir to none redults in 502 Bad Gateway
- Update automatically a form inside a function of a plugin
- How to prepare (compress/zip) a plugin to enable updating instead of adding new instance?
- WordPress website will not show menu on a Mobile Device
- WC Fix Attributes – ‘Add New’ Not Searchable/Delayed
- Change language in SiteOrigin Widgets
- WordPress Standard Fix Errors
- How to dynamically add template in Innerblock?
- any word search WordPress
- Warning: call_user_func_array() problem can anyone help with it?
- Include my files in a plugin? [duplicate]
- Some Widgets in the Right Side Bar and the whole Footer section is not working in a WordPress Site
- Swap picture in slider plugin
- Hello everyone! Is there a function to call the wordpress loader?
- How to call a function from inside class to outside class
- how can I edit the HTML of yith ajax product filter
- Contact Form 7 – Make a selection unavailable after a number of bookings
- Securing langugae folder
- Use modulo condition in ACF repeater Field
- Slider with two images at a time
- Return function results within shortcode
- Why is my Footnotes plugin is not working?
- Debug in WP backend
- WP-CLI plugin delete command fails silently
- Woocommerce categories displayed on every category and shopping page
- Frontend is empty wordpress
- Help with customising love it plugin (use within foreach)
- “Share” Content from Another Site as Post
- Best approach to serve static content within a regular page
- WP plugin calls for custom pages
- Javascript in plugin not working
- Theme editor removes backslashes
- add_external_rule – rules deleted when visiting permalinks page
- Change pages based on city
- Images not showing on homepage after migration [duplicate]
- Widget Script Loads at Bottom of Page
- import a latest vimeo user video into a page
- Create user assessment and use results in sql query
- Plugin Hook: Get posts
- auto create blog posts depending on list
- making a glossary with wordpress
- Add jQuery in dashboard when is already added in main plugin page
- Ajax Not Working If The Handler is Located Outside Plugin Submenu Page Function
- Google Language Translator – Manage Translation
- WordPress multisite haml templates
- Is it safe to increase/alter the size of the wp_post.guid column from VARCHAR(255) to VARCHAR(2048)?
- correct validate inputs
- Developing a Site Like AllTop.COM – RSS Reading Problem
- Display Custom Post Type and Custom Taxonomy Data on Front End Using Only a Plugin
- redirect to custom php template in wordpress plugin directory
- Why plugin’s icon for the menu not found?
- How to add a text in the checkout page woocomerce?
- prevent contact form 7 from submission on certain condition
- How can I send api calls from my plugin?