How to remove post from news feed wordpress
There are a few ways to remove a post from the news feed in WordPress, depending on the theme and plugins you're using. Here are a few methods:
Method 1: Using the WordPress Admin Panel
- Log in to your WordPress admin panel.
- Go to the "Posts" menu and select "All Posts".
- Find the post you want to remove from the news feed and hover over it.
- Click the "Quick Edit" button.
- In the "Visibility" section, select "Private" or "Draft" to remove the post from the news feed.
- Click "Update" to save the changes.
Method 2: Using a Plugin
If you're using a plugin like Yoast SEO or All in One SEO Pack, you can use their built-in features to remove a post from the news feed.
- Install and activate the plugin.
- Go to the plugin's settings page (e.g. Yoast SEO > Settings > News Feed).
- Find the post you want to remove from the news feed and toggle the switch to "Off" or "No" to remove it from the feed.
Method 3: Using a Theme-Specific Solution
Some themes, like Genesis or Thesis, have built-in features to remove posts from the news feed. Check your theme's documentation or settings page to see if this option is available.
Method 4: Using a Custom Code
If none of the above methods work, you can try using custom code to remove the post from the news feed. You'll need to add the following code to your theme's functions.php file:
function remove_post_from_news_feed($post_id) {
// Get the post object
$post = get_post($post_id);
// Check if the post is in the news feed
if (in_array($post_id, get_option('news_feed_posts'))) {
// Remove the post from the news feed
remove_post_meta($post_id, '_news_feed_post');
}
}
add_action('save_post', 'remove_post_from_news_feed');
This code checks if the post is in the news feed and removes it if it is. You'll need to replace $post_id
with the actual ID of the post you want to remove.
I hope these methods help you remove the post from your news feed in WordPress!