Pull Comments From Other Page(s) is WordPress plugin that allow you to pull comments from one or several pages and merge them among comments of target one. Resulting list will be sort in chronological order. Support both buildin (page, post) and any custom post type as source(s) and target page.
Note: Custom post type must support 'comments' feature
- PHP 7.3
- WordPress 5.4
I tested 'Pull Comments From Other Page(s)' on different set of PHP and WordPress version. I guarantee that plugin will work well if your PHP and WordPress version match with one of the ✔️ mark.
| WordPress | 5.4 | 5.5 | 5.6 | 5.7 | 5.8 | 5.9 | 6.0 |
|---|---|---|---|---|---|---|---|
| PHP 7.3 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ❔ |
| PHP 7.4 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| PHP 8.0 | ❔ | ❔ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| PHP 8.1 | ❔ | ❔ | ❔ | ❔ | ✔️ | ✔️ | ✔️ |
- ✔️ - Tested. Working well.
- ❔ - Not tested. Unknown status.
You may install the plugin on your WordPress until the configuration meet the minimal requirements. ❔ only denote that I haven't tested the code against such versions.
- Download latest release
- Upload plugin in "WordPress => Admin Panel => Plugins => Add New => Upload Plugin"
- Press "Activate Plugin" button on successful screen
From Plugin's Directory
- Open "WordPress => Admin Panel => Plugins => Add New"
- Search by plugin's slug surround by double quotes: "pull-comments-other-pages"
- Press 'Install Now' button and then 'Activate'
Using Composer on Bedrock
Run in terminal composer require wpackagist-plugin/pull-comments-other-pages
- Open "WordPress => Admin Panel => Pages" and select any page for editing
- Scroll down to 'Comments source' metabox
- Put the cursor into input 'Post(page, cpt)' and start typing the title of any previously existed page
- Select desired page from dropdown list
- Press 'Update' button at the top right
- Go to front-end and check the list of comments
Note: Steps #3 and #4 may be repeated any numbers of time that you desire.
A1: Switch to page edit screen in admin panel. Verify that checkbox 'Allow comments' in panel 'Discussion' are selected.
A2: Deactivate plugin Disable Comments or allow in their options at least at one post type
A3: Verify that your theme support comments output. See function wp_list_comments()
A: They should not. The plugin do not perform any database changes. All comments from source pages still associated with original pages. The plugin just retrieve them and merge with comments of target page. Even more, your users may still post comments on source(s) page and their will be appeared on target one automatically. On other side, your users may still post comments on target page and their will be merged with comments of source(s) one for displaying on target.
You may ask a question or post an issue on GitHub Issues. I check them daily and give response when I will be free.
Any actions on your hosting or custom development under your requirements. Create new project on UpWork and send me an invitation. Cost and terms are discussable.
The primary OS on my workstation is Linux Ubuntu 20.04.4 LTS. Perhaps, you should to do a little changes in docker-compose.yml or docker-sync.yml if you are using different
platform. While development I used all 3rd-party tools listed below. You should consider specified versions as minimum recommend. Such was installed on my machine before I
started the code of the plugin.
- Git v2.25.1
- Docker v20.10.17
- Docker Compose v2.6.0
- Docker Sync v0.7.2
- Unison v2.52.1 (ocaml 4.12.1)
- NodeJS v16.14.2
- Yarn 1.22.18
- Composer 2.2.9
- WP-CLI v2.5
Note: Pay attention that Unison and Ocaml versions must be the same with versions within image eugenmayer/unison. It will be pulled automatically during 1st start of Docker Sync.
Open a terminal and copy/past following commands 'as is':
git clone git@github.com:kumaxim/pull-comments-other-pages.git- no commentscd pull-comments-other-pages- subsequent commands consider that plugin's dir is your current foldercomposer install update- Download WordPress Core and plugins, install PHPCS and WPCS for linting, generate PSR4 class autoloadercomposer env:generate- generate.envwith variables that required in Docker Compose and subsequent commandscompoer wp:create-config- generatewp-config.phpcomposer wp:seed- install and populate WordPress with demo content(seetests/dummy.xml)yarn --frozen-lockfile- Download and Install Webpack, Cypress and other dependenciesyarn watch- Compile assets in background using Webpack (seewebpack.config.js)docker-sync-stack start- sync working files and start Docker containers
After all steps, open the plugin folder in your favorite IDE (I like PHPStorm) and start implementing any changes you want.
Before propose your code to the review, run the following checks:
composer lint:php- linting PHP code over WordPress Core standard with a little indulgence (seephpcs.xml)yarn lint:scripts- linting JS code (see.eslintrc.js)yarn lint:styles- linting SCSS code (see.stylelintrc.js)yarn cypress:open- run End2End tests using Cypress
Note: If you implemented new feature, write a Cypress test that cover it, please
If you want create and use your own release:
yarn build:production- Compile assetscomposer build:production- Remove dev-dependencies, optimize PSR4 autoloader and create archive
After all, you will find the file pull-comments-other-pages.zip in the current folder. Upload this archive in "WordPress => Admin Panel => Plugins => Add New => Upload Plugin"
to install your own build on any number WordPress sites you want.
Note: You do not to do this if you want to send the pull request. The release will be build automatically on GitHub Actions when I will merge your changes with master branch
- Plugin's behaviour cover only End2End tests
- Database container
dbtestsused for testing purposes only - Before Cypress run I generate new
wp-config.phpthat connect WordPress todbtests
I have plan to implement following features in the next release:
- Create shortcode
[pull-comments-other-pages post_ids="1,2,3..."]- Shortcode must display comments of posts [1,2,3] in any place where it will be placed
- Create widget
- The same as shortcode, but implemented in widget for better UI
- Create Gutenberg block
- The same as shortcode, but implemented as block for better UI
- Optimize GitHub Actions Workflow:
- Publish release to WordPress Plugin Directory automatically
I can't declare any deadline of the next release. Do them when I will be free. If you're want to contribute you may start from here.
Виктор from Telegram chat Митапы WordPress в Москве for the idea of this plugin
Kevin Brown for select2 library that I use for displaying dropdown in plugin's metabox
Matt Mullenweg and WordPress Core's Contributors for WordPress that my plugin extend
Maxim Kudryavtsev. 2022. All rights reserved.
The code in this repository distribute under General Public License version 2 or any later.
