# Theming the For Your Show WordPress plugin

This guide shows how to change the look of the For Your Show plugin
("For Your Show - Community Theatre Listing") so it matches your website.

You will need to add a little CSS to your WordPress site. You don't need to
edit the plugin itself, and your changes stay in place when the plugin updates.

Plugin: https://wordpress.org/plugins/for-your-show/


## 1. Start with the built-in options

Before writing any CSS, try the options on the block or shortcode:

- `theme="light"`: dark text on light cards (the default)
- `theme="dark"`: light text on dark cards, for dark websites
- `theme="auto"`: follows each visitor's light or dark setting
- `layout="list"`, `layout="grid"` or `layout="compact"`

For example:

    [foryourshow sections="shows,auditions" layout="grid" theme="dark"]

If your company has a page theme on For Your Show, the embed already uses its
brand colour, accent colour and fonts. If that's all you need, you're done.


## 2. Where to put your CSS

- **Block themes** (most newer themes, such as Twenty Twenty-Four and later):
  Appearance → Editor → Styles, open the Styles menu (⋮), then Additional CSS.
- **Classic themes**: Appearance → Customize → Additional CSS.
- Or your child theme's `style.css`, if you have one.


## 3. Always start your selectors with `.foryourshow`

The plugin wraps everything in `<div class="foryourshow">`, with the embed
inside it in `<div class="fys-embed">`. WordPress loads the plugin's styles
after your theme's, so a rule written only as `.fys-embed { … }` can be
overridden by the plugin's own rule. Writing `.foryourshow .fys-embed` makes
yours win:

    /* Works */
    .foryourshow .fys-embed { --fys-brand: #0b5394; }

    /* May be ignored */
    .fys-embed { --fys-brand: #0b5394; }


## 4. Change the colours

Most of the look comes from a handful of colour settings (CSS custom
properties). Change these first: it's quicker and less likely to break
than restyling each element.

| Setting        | What it colours                                    | Light default |
| -------------- | -------------------------------------------------- | ------------- |
| `--fys-brand`  | Buttons, links, the selected filter                | your page theme's brand colour, or `#7c2d12` |
| `--fys-link`   | Links (falls back to `--fys-brand`)                | not set       |
| `--fys-text`   | Main text                                          | `#1f2937`     |
| `--fys-muted`  | Dates, venues, "nothing on" messages               | `#6b7280`     |
| `--fys-card`   | The background of each show or audition card       | `#ffffff`     |
| `--fys-border` | Card borders, and the space behind loading posters | `#e5e7eb`     |
| `--fys-bg`     | The background behind the whole embed              | `transparent` |

Example, a navy and cream look:

    .foryourshow .fys-embed {
        --fys-brand: #1d3557;
        --fys-text: #1b1b1b;
        --fys-muted: #5c5c5c;
        --fys-card: #fffaf0;
        --fys-border: #e8dcc4;
    }

### Dark and auto themes

The dark theme sets its own text, card, border and link colours. To change
them, target the dark theme as well:

    .foryourshow .fys-embed[data-theme="dark"] {
        --fys-card: #14213d;
        --fys-border: #2b3a5c;
        --fys-link: #ffd166;
    }

For `theme="auto"`, put the same rule inside a dark-mode media query:

    @media (prefers-color-scheme: dark) {
        .foryourshow .fys-embed[data-theme="auto"] {
            --fys-card: #14213d;
            --fys-border: #2b3a5c;
            --fys-link: #ffd166;
        }
    }


## 5. Fonts and size

By default the embed uses your For Your Show page theme's fonts, or the
visitor's system font. To use your website's own fonts instead:

    .foryourshow .fys-embed {
        font-family: inherit;   /* the font of the page around it */
        font-size: 16px;        /* the default is 15px */
    }

    .foryourshow .fys-embed h2 {
        font-family: inherit;   /* section headings, such as "Current & upcoming shows" */
    }


## 6. Restyling particular parts

Each part of the embed has its own class. Use these after the colours, for
anything the colours don't cover.

| Class                  | What it is                                      |
| ---------------------- | ----------------------------------------------- |
| `.fys-embed`           | The whole embed                                 |
| `.fys-embed h2`        | Section headings (shows, auditions, …)          |
| `.fys-embed h3`        | Show and audition titles                        |
| `.fys-shows`           | The list of shows                               |
| `.fys-auditions`       | The list of auditions                           |
| `.fys-opportunities`   | The list of volunteer and crew roles            |
| `.fys-embed li`        | Each card                                       |
| `.fys-poster`          | A show's poster image                           |
| `.fys-meta`            | Dates, venue and other details                  |
| `.fys-actions`         | The row of buttons under a card                 |
| `.fys-button`          | The main button (e.g. tickets)                  |
| `.fys-link`            | Secondary links (e.g. more details)             |
| `.fys-empty`           | The message when there's nothing to show        |
| `.fys-badge`           | The "Powered by For Your Show" line             |

The layout you choose is on the embed as `data-layout="list"`, `"grid"` or
`"compact"`, so you can style one layout only:

    .foryourshow .fys-embed[data-layout="grid"] ul.fys-shows { … }

### Examples

Square cards with a shadow instead of a border:

    .foryourshow .fys-embed li {
        border: 0;
        border-radius: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    }

Square buttons in capitals:

    .foryourshow .fys-embed .fys-button {
        border-radius: 4px;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

Larger posters in the list layout:

    .foryourshow .fys-embed[data-layout="list"] .fys-poster {
        width: 140px;
    }

Three cards across in the grid layout on wide screens:

    @media (min-width: 900px) {
        .foryourshow .fys-embed[data-layout="grid"] ul.fys-shows {
            grid-template-columns: repeat(3, 1fr);
        }
    }

Hide the section headings, if your page already has one:

    .foryourshow .fys-embed h2 {
        display: none;
    }


## 7. Things to know

- **The "Powered by" line.** Please don't hide `.fys-badge` with CSS.
  Companies on a higher membership tier can switch it off on For Your Show,
  under Settings → Website embed.
- **Changes on For Your Show take a while to appear.** The plugin keeps a copy
  for 15 minutes by default. Your CSS shows straight away, but a new show may
  not. Use "Refresh now" under Settings → For Your Show to update at once.
- **Your theme's own styles can leak in.** Some themes style every list,
  heading or link on the page. If cards show bullet points, odd margins or
  underlines, add a rule with `.foryourshow .fys-embed` in front to put
  them back, for example:

      .foryourshow .fys-embed ul { margin: 0; padding: 0; list-style: none; }
      .foryourshow .fys-embed a  { text-decoration: none; }

- **Check it on a phone.** The grid layout fits as many cards across as it
  can, which can be one on a narrow screen.
- **The script and iframe snippets are different.** This guide is for the
  WordPress plugin. The iframe snippet can't be styled from your website's
  CSS; use the `theme` option and your For Your Show page theme instead.


## Need help?

Email support@foryourshow.com with a link to the page and what you're
trying to change.
