Image: Shutterstock

Caroline Cowburn

Caroline Cowburn is Assistant Vice Chancellor (Transformation) at the University of Bolton, and a member of the advisory board of Rise, a research institute for social mobility and transformation.

Blogs

Tag

Order

/* ── Old Wonkhe · events page · Code Snippets (site footer, every page) ── Undo: deactivate this snippet. Publish events.css in Additional CSS FIRST. Copy in this repo: docs/wonkhe-events-snippet.js (collaboration-question). Updated 23 September 2026: the featured matcher and the Collaboration Question entry now use collaboration.wonkhe.com, the event's published address since 22 September; the old domain still resolves to the same entry. With only the old domain listed, the card (which now links to collaboration.wonkhe.com) fell through to the free-webinar tier. What it does: on /events/ only, rebuilds the theme's image-only grid into four tiers – a featured event, the ticketed programme, webinars, and six chosen previous events – using the cards WordPress already prints. Titles come from each image's alt text; dates, straps and labels come from DETAILS below. Anything in Upcoming that is not listed as featured, programme or subscribers is a free webinar. Events that fall into the past move to Previous by the theme. Nothing here mentions subscribing, accounts or logging in. TO EDIT: change DETAILS (one entry per event, keyed by the slug in its link, or by a word from its image filename, or by the host of an external link) and the PREVIOUS list. Missing entries are fine: the card still shows, without a date. A featured event is matched by its link host, so if its address changes, add the new host to FEATURED and key a DETAILS entry by it. */ (function () { 'use strict'; if (!document.body || !document.body.classList.contains('page-template-template-events')) return; /* ── 1. The parts you change ─────────────────────────────────────────── */ var FEATURED = ['collaboration.wonkhe.com', 'thecollaborationquestion.com']; // the event's published address, then its old domain var PROGRAMME = ['making-sense-of-higher-education']; var SUBSCRIBERS = ['Policy-Radar']; // matched against link and image filename var PREVIOUS = [ // the six shown, in this order // a slug (last part of the event's address) or a host, matched against the cards the theme prints… // …or, for an event the theme does not print, an object with its address, title and card image { href: 'https://wonkhe.com/events/connect-more/', title: 'Connect more', img: 'https://wonkhe.com/wp-content/wonkhe-uploads/2025/01/Connect-more-event-booking-1.jpg' }, 'the-secret-life-of-students-2026', { href: 'https://wonkhe.com/events/closing-the-loop/', title: 'Closing the loop: building a feedback framework for student success', img: 'https://wonkhe.com/wp-content/wonkhe-uploads/2026/05/Evasys-webinar-1.png' }, 'thefestivalofhe.com', { href: 'https://wonkhe.com/events/show-them-the-money-exploring-effective-governance-of-university-finances/', title: 'Show them the money? Exploring effective governance of university finances', img: 'https://wonkhe.com/wp-content/wonkhe-uploads/2025/12/tech-one-webinar26.jpg' }, 'belongfromthebeginning' ]; var DETAILS = { 'collaboration.wonkhe.com': { eyebrow: 'An exclusive Wonkhe event', title: 'The collaboration
question', titleHref: 'https://collaboration.wonkhe.com/', strap: 'Getting real and making it real in UK higher education', facts: [['When', 'Tuesday 3 November 2026'], ['Where', 'Impact Hub Euston, London'], ['Format', 'A one-day, in-person event'], ['Tickets', 'Discounts for Wonkhe subscribers']], book: { label: 'Book your place', href: 'https://collaboration.wonkhe.com/' }, more: { label: 'Full programme', href: 'https://collaboration.wonkhe.com/programme' } }, 'making-sense-of-higher-education': { art: 'https://wonkhe.com/wp-content/wonkhe-uploads/2026/09/mazepattern.png', // the maze-only image for the left panel kicker: 'Wonkhe presents · ticketed · online', strap: 'Ten live online modules that give anyone who works in or around universities rapid cross-sector fluency – governors, new starters, professional services and people stepping up.', when: 'October 2026 – April 2027 · ten live modules · recordings included', cta: 'Book tickets →' }, 'education-espresso-a-shot-of-pedagogical-inspiration': { kicker: 'Wonkhe × Adobe', chip: 'Free', accent: 'red', title: 'Education Espresso: reclaiming productivity in learning and teaching', strap: 'A shot of pedagogical inspiration on managing workload, collaborating on curriculum and getting routine work off your desk.', when: 'Thu 1 October · 12–1pm · online', cta: 'Sign up free →' }, 'keeping-the-learning-real-academic-integrity-in-the-age-of-ai': { kicker: 'Wonkhe × Studiosity', chip: 'Free', accent: 'purple', strap: 'Up-to-the-minute practice on the strategies institutions are adopting to keep assessment honest and learning real.', when: 'Thu 8 October · online', cta: 'Sign up free →' }, 'Policy-Radar': { title: 'Policy Radar', kicker: 'For Wonkhe subscribers', chip: 'Subscribers', chipClass: 'subs', accent: 'green', strap: 'The regular briefing that keeps subscribers ahead of what’s moving in higher education policy.', when: 'Tue 6 October · 12–1pm · online', cta: 'Joining info to come', link: false } }; // The old event domain resolves to the same entry, so a card that still links to it is featured too. DETAILS['thecollaborationquestion.com'] = DETAILS['collaboration.wonkhe.com']; var HERO = { title: 'Events', lede: 'Ticketed days that bring the sector together, free webinars, and regular sessions for subscribers.' }; var HEADINGS = { programme: 'Ticketed programme', webinars: 'Webinars', previous: 'Previous events' }; var WEBINAR_ACCENTS = ['blue', 'green', 'purple', 'pink', 'lblue', 'red']; // for cards without an entry, in turn /* ── 2. Read what the theme printed ──────────────────────────────────── */ var row = document.querySelector('main.main > .container > .row.py-4'); if (!row) return; var sections = row.querySelectorAll(':scope > .col-md-12'); if (sections.length < 1) return; var upcoming = sections[0], previous = sections[1] || null; var viewAll = row.querySelector('a.load-more-btn'); function keyFor(a) { var href = a.getAttribute('href') || '', img = a.querySelector('img'), src = img ? (img.getAttribute('src') || '') : ''; var m = href.match(/wonkhe\.com\/events\/([^/?#]+)/); if (m) return m[1]; var lists = FEATURED.concat(PROGRAMME, SUBSCRIBERS), i; for (i = 0; i < lists.length; i++) if (href.indexOf(lists[i]) !== -1 || src.indexOf(lists[i]) !== -1) return lists[i]; var h = href.match(/^https?:\/\/(?:www\.)?([^/]+)/); return h ? h[1] : src.split('/').pop().replace(/\.\w+$/, ''); } function titleFor(a) { var img = a.querySelector('img'), alt = img ? (img.getAttribute('alt') || '') : ''; return alt.replace(/^Image of\s+/i, '').trim(); } function tierFor(key, a) { var href = a.getAttribute('href') || '', img = a.querySelector('img'), src = img ? (img.getAttribute('src') || '') : ''; function hit(list) { for (var i = 0; i < list.length; i++) if (key === list[i] || href.indexOf(list[i]) !== -1 || src.indexOf(list[i]) !== -1) return true; return false; } if (hit(FEATURED)) return 'featured'; if (hit(PROGRAMME)) return 'programme'; if (hit(SUBSCRIBERS)) return 'subscribers'; return 'webinar'; } function el(tag, cls, html) { var e = document.createElement(tag); if (cls) e.className = cls; if (html !== undefined) e.innerHTML = html; return e; } function text(tag, cls, str) { var e = document.createElement(tag); if (cls) e.className = cls; e.textContent = str; return e; } function heading(str, tone) { var h = el('h2', 'wk-ev-heading wk-ev-heading--' + tone); h.textContent = str; return h; } var cards = []; upcoming.querySelectorAll('a[href]').forEach(function (a) { if (!a.querySelector('img')) return; var key = keyFor(a); cards.push({ a: a, key: key, tier: tierFor(key, a), title: titleFor(a), d: DETAILS[key] || {} }); }); if (!cards.length) return; /* ── 3. Build the new page ───────────────────────────────────────────── */ var out = el('div', 'wk-ev'); var hero = el('div', 'wk-ev-hero'); hero.appendChild(text('h1', 'wk-ev-title', HERO.title)); hero.appendChild(text('p', 'wk-ev-lede', HERO.lede)); out.appendChild(hero); cards.filter(function (c) { return c.tier === 'featured'; }).forEach(function (c) { var d = c.d, box = el('section', 'wk-ev-feat'); box.appendChild(el('span', 'wk-ev-feat__bar')); var inner = el('div', 'wk-ev-feat__in'), txt = el('div', 'wk-ev-feat__txt'); if (d.eyebrow) txt.appendChild(text('p', 'wk-ev-feat__eyebrow', d.eyebrow)); var h2 = el('h2', 'wk-ev-feat__title'); if (d.titleHref || c.a.href) { var tl = el('a', '', d.title || c.title); tl.href = d.titleHref || c.a.href; tl.target = '_blank'; tl.rel = 'noopener'; h2.appendChild(tl); } else { h2.innerHTML = d.title || c.title; } txt.appendChild(h2); if (d.strap) txt.appendChild(text('p', 'wk-ev-feat__strap', d.strap)); inner.appendChild(txt); if (d.facts && d.facts.length) { var dl = el('dl', 'wk-ev-feat__facts'); d.facts.forEach(function (f) { var w = el('div'); w.appendChild(text('dt', '', f[0])); w.appendChild(text('dd', '', f[1])); dl.appendChild(w); }); inner.appendChild(dl); } var cta = el('div', 'wk-ev-feat__cta'); var book = text('a', 'wk-ev-feat__book', (d.book && d.book.label) || 'Find out more'); book.href = (d.book && d.book.href) || c.a.href; if (/^https?:\/\/(?!wonkhe\.com)/.test(book.href)) { book.target = '_blank'; book.rel = 'noopener'; } cta.appendChild(book); if (d.more) { var more = text('a', 'wk-ev-feat__more', d.more.label); more.href = d.more.href; more.target = '_blank'; more.rel = 'noopener'; cta.appendChild(more); } inner.appendChild(cta); box.appendChild(inner); out.appendChild(box); }); var programmes = cards.filter(function (c) { return c.tier === 'programme'; }); if (programmes.length) { out.appendChild(heading(HEADINGS.programme, 'orange')); programmes.forEach(function (c) { var d = c.d, band = el('a', 'wk-ev-prog'); band.href = c.a.href; var art = el('div', 'wk-ev-prog__art' + (d.art ? ' wk-ev-prog__art--own' : '')); var img = c.a.querySelector('img'); if (d.art) { var own = document.createElement('img'); own.src = d.art; own.alt = ''; art.appendChild(own); } else if (img) { img.removeAttribute('class'); img.removeAttribute('sizes'); art.appendChild(img); } band.appendChild(art); var body = el('div', 'wk-ev-prog__body'); if (d.kicker) body.appendChild(text('p', 'wk-ev-prog__kicker', d.kicker)); body.appendChild(text('h3', 'wk-ev-prog__title', d.title || c.title)); if (d.strap) body.appendChild(text('p', 'wk-ev-prog__strap', d.strap)); if (d.when) body.appendChild(text('p', 'wk-ev-prog__when', d.when)); body.appendChild(text('span', 'wk-ev-prog__go', d.cta || 'Find out more →')); band.appendChild(body); out.appendChild(band); }); } var webinars = cards.filter(function (c) { return c.tier === 'webinar' || c.tier === 'subscribers'; }); if (webinars.length) { out.appendChild(heading(HEADINGS.webinars, 'green')); var grid = el('div', 'wk-ev-grid'), n = 0; webinars.forEach(function (c) { var d = c.d, subs = c.tier === 'subscribers'; var linked = d.link !== false && !subs; var card = el(linked ? 'a' : 'div', 'wk-ev-card wk-ev-card--' + (d.accent || (subs ? 'orange' : WEBINAR_ACCENTS[n++ % WEBINAR_ACCENTS.length])) + (linked ? '' : ' wk-ev-card--still')); if (linked) card.href = c.a.href; card.appendChild(el('span', 'wk-ev-card__bar')); var body = el('span', 'wk-ev-card__body'); var kick = el('span', 'wk-ev-card__kicker'); kick.appendChild(document.createTextNode(d.kicker || 'Wonkhe')); var chip = text('span', 'wk-ev-chip' + (d.chipClass ? ' wk-ev-chip--' + d.chipClass : (subs ? ' wk-ev-chip--subs' : '')), d.chip || (subs ? 'Subscribers' : 'Free')); kick.appendChild(chip); body.appendChild(kick); body.appendChild(text('span', 'wk-ev-card__title', d.title || c.title)); if (d.strap) body.appendChild(text('span', 'wk-ev-card__strap', d.strap)); if (d.when) body.appendChild(text('span', 'wk-ev-card__when', d.when)); body.appendChild(text('span', 'wk-ev-card__go', d.cta || (subs ? 'Joining info to come' : 'Sign up free →'))); card.appendChild(body); grid.appendChild(card); }); out.appendChild(grid); } if (previous) { var prevCards = []; previous.querySelectorAll('a[href]').forEach(function (a) { if (a.querySelector('img')) prevCards.push(a); }); var chosen = []; PREVIOUS.forEach(function (want) { if (typeof want === 'string') { prevCards.some(function (a) { if ((a.getAttribute('href') || '').indexOf(want) !== -1 && chosen.indexOf(a) === -1) { chosen.push(a); return true; } return false; }); } else if (want && want.href) { var a = document.createElement('a'); a.href = want.href; var img = document.createElement('img'); img.src = want.img || ''; img.alt = 'Image of ' + (want.title || ''); img.loading = 'lazy'; a.appendChild(img); chosen.push(a); } }); if (!chosen.length) chosen = prevCards.slice(0, 6); out.appendChild(heading(HEADINGS.previous, 'purple')); var pg = el('div', 'wk-ev-prev'); chosen.forEach(function (a) { var li = el('a', 'wk-ev-prev__item'); li.href = a.href; var img = a.querySelector('img'); img.removeAttribute('class'); img.removeAttribute('sizes'); li.appendChild(img); li.appendChild(text('span', 'wk-ev-prev__name', titleFor({ querySelector: function () { return img; } }))); pg.appendChild(li); }); out.appendChild(pg); var all = text('a', 'wk-ev-viewall', 'View all previous events'); all.href = viewAll ? viewAll.href : 'https://wonkhe.com/previous-events/'; out.appendChild(all); } row.parentNode.insertBefore(out, row); row.classList.add('wk-ev-original'); document.body.classList.add('wk-ev-live'); })();