139 lines
4.7 KiB
Markdown
Raw Normal View History

# Fourthwall Store Embed WordPress Plugin
2024-12-27 22:12:16 +00:00
A WordPress plugin to embed Fourthwall Store products in your WordPress site.
## Shortcodes
### Display All Store Products
```
[fourthwall]
```
Displays all products from your Fourthwall store.
### Display Single Product
```
[fourthwall_single url="https://your-store.com/product-url" show_description="true"]
```
Displays a single product with optional description.
**Parameters:**
- `url` (required): The full URL of the product
- `show_description` (optional): Set to "true" to show product description
### Display Random Products
```
[fourthwall_random count="5"]
```
Displays a random selection of products from your store.
**Parameters:**
- `count` (optional): Number of products to display (default: 3)
- `urls` (optional): Comma-separated list of specific product URLs to randomize from
- `store_url` (optional): Custom store URL (uses default from settings if not provided)
#### Examples:
**Random 5 products from all store products:**
```
[fourthwall_random count="5"]
```
**Random 3 products from specific URLs:**
```
[fourthwall_random count="3" urls="https://store.com/product1,https://store.com/product2,https://store.com/product3"]
```
**Random 2 products from a different store:**
```
[fourthwall_random count="2" store_url="https://different-store.com"]
```
## Installation
1. Upload the plugin files to `/wp-content/plugins/fourth-wall-embed-wp/`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to Settings > Fourthwall Store Embed to configure your store URL
## Configuration
In the WordPress admin, go to Settings > Fourthwall Store Embed to set your Fourthwall store URL.
## Features
- Caches requests for better performance
- Responsive design
- SSL verification options
- Error handling for failed requests
- Random product selection
- Support for multiple store URLs
2025-01-10 19:57:13 -08:00
### How to use the plugin
* Download the latest release from [releases](https://repo.anhonesthost.net/CyberCoveLLC/fourth-wall-embed-wp/releases)
* Upload the Plugin to WordPress
* In the WordPress Dashboard, Navigate to the Fourthwall settings page, and paste your store URL.
2025-01-10 19:57:13 -08:00
#### Configuration Options
**Store URL**: Enter your Fourthwall store URL (e.g., `https://your-store.fourthwall.com`)
**SSL Verification**:
- **Enabled (Recommended)**: Use for production sites to ensure secure connections
- **Disabled**: Use only for local development when SSL certificates are not properly configured
**Cache Management**:
- Content is automatically cached for 1 hour to improve performance
- Use the "Clear Cache" button if products are not updating
#### Display your entire store
To display your entire Fourthwall store on a page, use the shortcode:
```[fourthwall]```
#### Display a single product
To display an individual product from your Fourthwall store, use the shortcode with the product URL:
```[fourthwall_single url="https://your-store.fourthwall.com/products/product-name"]```
You can also display the product description by setting the `show_description` attribute to "true":
```[fourthwall_single url="https://your-store.fourthwall.com/products/product-name" show_description="true"]```
### Features
- **Smart Caching**: Automatic caching system reduces server load and improves performance
- **Configurable SSL**: Toggle SSL verification for development vs production environments
- **Error Handling**: Graceful fallbacks and clear error messages
- **Admin Interface**: User-friendly settings page with clear instructions
- **Cache Management**: Manual cache clearing for troubleshooting
- **Responsive Design**: CSS styling for both frontend and admin areas
### Requirements
* WordPress 6.0 or higher
* PHP 7.4 or higher
* Active Fourthwall store
* cURL extension enabled
### Performance Notes
- Content is cached for 1 hour to reduce API calls to Fourthwall
- Cache automatically refreshes when content changes
- Manual cache clearing available in admin settings
- SSL verification can be disabled for local development
### Troubleshooting
**Products not updating?**
- Clear the cache using the "Clear Cache" button in admin settings
- Check your store URL is correct
- Verify SSL verification setting matches your environment
**SSL errors in development?**
- Disable SSL verification in admin settings (development only)
- Ensure proper SSL certificates in production
**403 Forbidden errors?**
- Fourthwall may be blocking automated requests
- Check if your store is publicly accessible
- Contact Fourthwall support if issues persist
This plugin allows you to integrate your Fourthwall store directly into your WordPress site, either showing your complete product collection or featuring specific products individually.
If you can think of things that could be improved or find any bugs, please open an issue on the repository.