joshuadavidnelson / disable-blog

All the power of WordPress, without a blog. This plugin removes blog related functionality.
https://wordpress.org/plugins/disable-blog/
GNU General Public License v2.0
52 stars 6 forks source link

Disable Blog

WordPress Plugin Version Downloads Rating

WP compatibility PHP compatibility

Requires at least WordPress: 5.3
Tested up to WordPress: 6.4.2
Stable version: 0.5.4
License: GPLv2 or later
Requires PHP: 7.4
Tested up to PHP: 8.2

All the power of WordPress, without a blog.

Description

Disable Blog is a comprehensive plugin to disable the built-in blogging functionality on your site. You'll be free to use pages and custom post types without the burden of a blog.

The blog is "disabled" when the plugin is activated, which removes support for the core 'post' type, hides blog-related admin pages/settings, and redirects urls on both the public and admin portions of the site. Refer to below for a detailed functionality list.

Important: Set a front page

You need to select a page to act as the home page. If Settings > Reading > "Front Page Displays" is not set to show a page, then this plugin will not function correctly. Not doing so will mean that your post page can still be visible on the front-end of the site. It's not required, but it is recommended you select a page for the "posts page" setting, this page will be automatically redirected to the static "home page."

Site Content & Data

This plugin will not delete any of your site's data, however existing blog related content will not be accessible while this plugins is active. This includes posts, categories, tags, and related comments.

If you have content and wish to remove it, either delete that content prior to activation or deactivate this plugin, delete it, and re-active.

Comments

Comments remain enabled, unless the 'post' type is the only type supporting comments (pages also support comments by default, so the comments section won't disappear in most cases). If you're looking to disable comments completely, check out the Disable Comments plugin.

How does this plugin work?

Activating Disable Blog does the following:

Note that this plugin will not delete anything - existing posts, comments, categories and tags will remain in your database.

If Settings > Reading > Front Page Displays is not set to show on a page, then some aspects of the plugin won't work, be sure to set your front page to a static page.

FAQ

  1. Can I Disable Comments?
    • Other post types (like Pages) may have comment support and other great plugins exist that can disable comments, so this feature was not part of the initial development of this plugin. A future release will include options to disable comments, but until then if you would like to disable comments, try the Disable Comments plugin.
  2. I want to delete my posts and comments
    • Deactivate the plugin, delete your posts (which will delete related comments), and delete any tags or categories you might want to remove as well. Then reactivate the Disable Blog to hide everything again.
  3. How can I disable author archives?
    • If you're not using the built-in WP author archives for other purposes (example url: example.com/author/author-name) and would like to disable them entirely, add the following to your theme functions.php file or a custom plugin file: add_filter( 'dwpb_disable_author_archives', '__return_true' );. If author archives are not disabled, the plugin adds functionality to support custom post types on author archives by passing an array of post type slugs to dwpb_author_archive_post_types filter - however, theme support is usually needed to disable custom content types correctly.

Support

This plugin is maintained for free but please reach out and I will assist you as soon as possible. You can visit the WordPress.org support forums or create an issue on the GitHub repository.

Contributing

All contributions are welcomed and considered, please refer to contributing.md.

Pull requests

All pull requests should be directed at the develop branch, and will be reviewed prior to merging. No pull requests will be merged with failing tests, but it's okay if you don't initially pass tests. Please create a draft pull request for proof of concept code or changes you'd like to have input on prior to review.

Please make on a branch specific to a single issue or feature. For instance, if you are suggest a solution to an issue, please create fork with a branch like issue-894. Or if you are proposing a new feature, create a fork with the branch name indicating the feature like feature-example-bananas

All improvements are merged into develop and then queued up for release before being merged into stable. Releases are deployed via github actions to wordpress.org on tagging a new release.

Main Branches

The stable branch is reserved for releases and intended to be a mirror of the official current release, or trunk on wordpress.org.

The develop branch is the most current working branch. Please direct all pull requests to the develop branch

Developing Disable Blog Locally

Requirements:

This repo contains the files needed to boot up a local development environment using wp-env.

Run npm install and the npm run env:start to boot up a local environment.