One Viewer is a lightweight Wordpress plugin that pulls posts filtered by category from the Wordpress API. It shows the posts in a nice interface created with VueJs framework, and has a smooth animation when navigating through the posts by clicking next and previous buttons.
One Viewer allows the user to decide which posts should be added to the plugin's interface by selecting one or multiple categories from the settings page.
FEATURES
- Easy to use without any configuration.
- Loading posts with AJAX.
- Navigation Buttons.
- Navigate using the keyboard ("j" and "k" keys).
- Support for swiping on touch-enabled devices.
- Responsive and mobile-friendly.
- "Settings" page to select categories.
- Easily integrated with any theme without affecting any existing styles.
- WordPress >= 4.9
- Download the plugin from the Releases tab.
- Install using the WordPress built-in Plugin installer, or Extract the .zip file and drop the contents in the
wp-content/plugins/
directory of your WordPress installation. - Activate the plugin through the
Plugins
menu in WordPress. - Navigate to
Dashboard
▸Settings
▸OneViewer
and select your categories. - Navigate to https://www.YOURURL.com/viewer to see your posts.
This plugin will create a page at'/viewer', please note that if you already have a page with the same name you will not be able to access your old page, but you will not lose any data. To avoid this problem you will have to re-name your old page's slug name. Otherwise, if you disabled the plugin the old page will be back to work.
- Clone this repo inside your plugins folder.
- Open the folder on your preferable editor.
- This plugin is lightweight and based on CDN libraries.
- Nothing to compile or config.
- Happy Hacking :)
Folder Architecture
├── assets
│ ├── css # Custom styles.
│ ├── js # VueJs Application.
│
├── includes # Core Files.
│ ├── class-one-viewer.php # Class to manage all the plugin's logic.
│ ├── class-one-viewer-endpoints.php # Class to manage the plugin's routes.
│
├── templates # Plugin Html templates.
│ ├── page-one-viewer.php # Front-end HTML tempalte.
│
└── wp-one-viewer.php # Plugin bootstraping and plugin info.
All contributions are welcome.