This plugin adds a Gutenberg block that implement the WOO Portal into the WordPress block editor.
In order to make the WOO Portal Plugin work, you will need to have a OpenPub installation with at least the following installed (and activaterd):
On this OpenPub installation you will have to enable pretty permalinks (Settings > Permalinks > Select any of the options that is not plain). And under Settings > OpenPub Portal, you will need to fill in the portal url.
Now you have set up your OpenPub installation, you can set up the WOO Portal. There are three possible setups for the WOO Portal, this can be:
- On the WordPress installation of an existing website.
- On the same installation as the OpenPub.
- On a completely new WordPress installation.
In all three scenarios the WOO Portal needs to have the following installed (and activated):
With this installed you can use the WOO Portal Search block on any page of your WordPress website. With this block there are several settings that need to be set in order for the block to work correctly.
If you chose for option 2 (same installation as the OpenPub) or option 3 (new WordPress installation), you will probably need to install a WordPress theme.. You can use the WOO Portal Theme, which is a simple theme for a WOO Portal. This theme provides several settings:
- Under Appearance > Customize > WOO Portal Theme, you can set the WOO Portal Colors.
- Under Theme Options there are several settings that need to be set.
- Upload the
woo-portal-plugin
folder to the/wp-content/plugins/
directory. cd /wp-contents/plugins/woo-portal-plugin
npm install && npm run build
- Activate the WOO Portal Plugin through the 'Plugins' menu in WordPress.
composer source [email protected]:OpenWebconcept/plugin-woo-portal-plugin.git
composer require acato/woo-portal-plugin
cd /wp-contents/plugins/woo-portal-plugin
npm install && npm run build
- Activate the WOO Portal Plugin through the 'Plugins' menu in WordPress.
Please remember, we use the WordPress PHP Coding Standards for this plugin! (https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/) To check if your changes are compatible with these standards:
cd /wp-content/plugins/woo-portal-plugin
composer install
(this step is only needed once after installing the plugin)./vendor/bin/phpcs --standard=phpcs.xml.dist .
- See the output if you have made any errors.
- Errors marked with
[x]
can be fixed automatically by phpcbf, to do so run:./vendor/bin/phpcbf --standard=phpcs.xml.dist .
- Errors marked with
N.B. the composer install
command also install a git hook, preventing you from committing code that isn't compatible with the coding standards.
wp i18n make-pot . languages/woo-portal-plugin.pot --exclude="node_modules/,vendor/" --domain="woo-portal-plugin"
cd languages && wp i18n make-json woo-portal-plugin-nl_NL.po --no-purge
For development, make sure you whitelist your localhost.
add_filter( 'http_request_host_is_external', function( $is_external, $host, $url ) { return $is_external || 'your-development-site.test' === $host; }, 10, 3 );