### Configure calendar start day
Source: https://help.fooevents.com/docs/topics/events/shortcodes
Sets the first day of the week, where 0 is Sunday and 1 is Monday.
```text
[fooevents_calendar firstDay="0"] 0 = Sunday, 1 = Monday etc.
```
--------------------------------
### WooCommerce add-to-cart URL examples
Source: https://help.fooevents.com/docs/topics/events/product-and-shop-pages
Various URL configurations for adding products to the cart and controlling post-action redirection.
```text
http://yourdomain.com/?add-to-cart=124
```
```text
http://yourdomain.com/?add-to-cart=124&quantity=2
```
```text
http://yourdomain.com/cart/?add-to-cart=124
```
```text
http://yourdomain.com/checkout/?add-to-cart=124
```
```text
http://yourdomain.com/your_custom_page/?add-to-cart=124
```
--------------------------------
### Display event start time on shop listing
Source: https://help.fooevents.com/docs/topics/code-snippets
Add this to functions.php to inject event time metadata into WooCommerce shop loops. Use the 'fooevents-date' CSS class to style the output.
```php
function fooevents_display_time_in_shop_listing() {global $post;if (is_front_page() || is_home() || is_shop() || is_product_category() || is_product_tag()) {echo '
';}}add_filter( 'woocommerce_after_shop_loop_item_title', 'fooevents_display_time_in_shop_listing', 35 );
```
--------------------------------
### Update .htaccess for Subdirectory WordPress Installation
Source: https://help.fooevents.com/docs/topics/check-ins-app/connection-issues
Replace the existing .htaccess content in your subdirectory WordPress installation to resolve permalink conflicts. Ensure the RewriteBase and RewriteRule paths are updated to match your specific subdirectory name.
```apache
# BEGIN WordPress
RewriteEngine On
RewriteBase /your-subdirectory/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subdirectory/index.php [L]
# END WordPress
```
--------------------------------
### Display FREE for Zero Price Products
Source: https://help.fooevents.com/docs/topics/code-snippets
Replaces the price display with 'FREE' for products with a price of zero or empty value. Add this to your theme's functions.php file.
```php
add_filter( 'woocommerce_get_price_html', 'wp_price_free_zero_empty', 100, 2 );
function wp_price_free_zero_empty( $price, $product ) {
if ( '' === $product->get_price() || 0 == $product->get_price() ) {
$price = 'FREE';
}
return $price;
}
```
--------------------------------
### Define theme configuration in config.json
Source: https://help.fooevents.com/docs/topics/tickets/ticket-themes/custom-ticket-themes
The config.json file declares the theme name and compatibility settings for HTML, PDF, and POS outputs.
```json
{
"name": "Canvas Ticket Theme",
"supports-html": "true",
"supports-pdf": "true",
"supports-pos": "false"
}
```
--------------------------------
### Embed YouTube Live Stream via iFrame
Source: https://help.fooevents.com/docs/frequently-asked-questions/events/how-do-i-embed-a-live-stream-for-a-zoom-meeting-or-webinar
Use this HTML iFrame code to embed a live stream on your site, replacing the example channel ID with your own.
```html
```
--------------------------------
### FooEvents template file paths
Source: https://help.fooevents.com/docs/topics/events/product-and-shop-pages
The default file paths for FooEvents templates within the plugin directory.
```text
wp-content/plugins/fooevents/templates/event-tab-map.php
```
```text
wp-content/plugins/fooevents/templates/event-tab.php
```
--------------------------------
### Display event date on product page
Source: https://help.fooevents.com/docs/topics/code-snippets
Hooks into the WooCommerce single product summary to display event start and end dates. Requires the FooEvents plugin to be active.
```php
function fooevents_display_date_on_single() {
global $post;
$product = wc_get_product( $post->ID );
$start_date = $product->get_meta( 'WooCommerceEventsDate' );
$end_date = $product->get_meta( 'WooCommerceEventsEndDate' );
if ( $end_date ) {
printf(
'
',
esc_html( $start_date )
);
}
}
add_action( 'woocommerce_single_product_summary', 'fooevents_display_date_on_single' );
```
--------------------------------
### Display Multi-day Event Times in Ticket Themes
Source: https://help.fooevents.com/docs/frequently-asked-questions/ticket-themes/how-do-i-add-support-for-daily-start-and-end-times-to-my-ticket-themes
Use this PHP snippet within your custom ticket theme template to iterate through event dates and display the corresponding start and end times.
```php
```
--------------------------------
### Render Product Attributes
Source: https://help.fooevents.com/wp-content/uploads/2026/03/fooevents_variable_table_bookings.txt
Iterates through product attributes and displays them as formatted div elements.
```php
foreach ( $value['attributes'] as $key => $val ) {
$val = str_replace( array( '-', '_' ), ' ', $val );
printf( '
%s
', $key, ucwords( $val ) );
}
```
--------------------------------
### Configure Ticket Theme Metadata
Source: https://help.fooevents.com/docs/topics/tickets/custom-ticket-themes
Define the theme name and output capabilities in the config.json file. Ensure values remain as strings to maintain compatibility.
```json
{
"name": "Canvas Ticket Theme",
"supports-html": "true",
"supports-pdf": "true",
"supports-pos": "false"
}
```
```json
"supports-pdf": "false"
```
--------------------------------
### Nginx Deny Access Rule for PDF Tickets
Source: https://help.fooevents.com/docs/topics/tickets/pdf-tickets/pdf-ticket-folder-protection
Add this rule to your Nginx server block to block direct access to the PDF ticket directory. Adjust the path if your WordPress installation uses a custom uploads directory.
```nginx
location ^~ /wp-content/uploads/fooevents/pdftickets/ {
deny all;
}
```