A powerful and flexible WordPress popup plugin built with modern technologies. Create and manage beautiful, responsive popups with ease using WordPress custom post types and React.
-
Modern Architecture
- Object-Oriented Programming (OOP) with PHP namespaces
- Singleton Pattern implementation
- Custom traits and interfaces
- WordPress REST API integration
-
Custom Post Type Integration
- Native WordPress custom fields
- No external plugin dependencies
- Simple and intuitive admin interface
-
Frontend Excellence
- Built with React for smooth interactions
- SASS styling for maintainable CSS
- Responsive design
- Customizable animations
-
Security First
- Protected REST API endpoints
- WordPress nonce verification
- User authentication checks
- WordPress 5.8 or higher
- PHP 7.4 or higher
- Node.js 14 or higher
- npm 6 or higher
- Clone this repository into your WordPress plugins directory:
cd wp-content/plugins
git clone https://github.com/EngRidhoNet/ArtStudio-Popup- Install dependencies:
cd artstudio-popup
npm install- Build the assets:
npm run build
npm run sass- Activate the plugin through the WordPress admin interface:
- Navigate to Plugins > Installed Plugins
- Find "ArtStudio Popup"
- Click "Activate"
- Add the repository to your
composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/EngRidhoNet/ArtStudio-Popup"
}
]
}- Install development dependencies:
npm install --save-dev @wordpress/scripts sass- Start development server:
npm run start- Watch SASS files:
npm run sass -- --watch- In WordPress admin, go to "Popups" > "Add New"
- Fill in the following fields:
- Title: The popup title
- Description: The popup content (supports HTML)
- Page: The page URL where the popup should appear
- Click "Publish" to save your popup
- Use
*in the Page field to show the popup on all pages - Enter specific page URLs to target individual pages
- Multiple pages can be targeted using comma-separated values
- Create a
custom.scssfile insrc/scss/:
// Override default variables
$popup-bg: rgba(0, 0, 0, 0.9);
$content-bg: #f5f5f5;
$primary-color: #ff4444;- Import it in
popup.scss:
@import 'custom';- Rebuild styles:
npm run sassGET /wp-json/artistudio/v1/popup
Required Headers:
X-WP-Nonce: WordPress nonce- User must be logged in
Response Format:
[
{
"id": 1,
"title": "Example Popup",
"description": "Popup content here",
"page": "/example-page"
}
]- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the GPL v2 or later - see the LICENSE file for details.
- Ridho Aulia Rahman - Halcyon - Me
-
Popup not showing:
- Check if the page URL matches exactly
- Verify user permissions
- Check browser console for errors
-
Build fails:
- Ensure all dependencies are installed
- Clear npm cache:
npm cache clean --force - Remove node_modules and reinstall
-
API errors:
- Verify WordPress permalinks are set
- Check REST API is enabled
- Confirm user is logged in
For more issues, please check the issues page.