Created
          August 20, 2025 08:47 
        
      - 
      
 - 
        
Save chugs/f7bc5b8fe7336b8aaadf267a94ac36d0 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | jQuery(document).ready(function ($) { | |
| function updateFestivalTitle() { | |
| let titleEl = $("#tribe-events-dynamic-title"); | |
| if (!titleEl.length) return; | |
| let params = new URLSearchParams(window.location.search); | |
| let termId = params.get(pfFestivalData.taxonomyParam + "[0]"); | |
| if (termId) { | |
| if ( | |
| pfFestivalData.festivalName && | |
| pfFestivalData.festivalName.length > 0 | |
| ) { | |
| titleEl.text("Events – " + pfFestivalData.festivalName); | |
| } | |
| } else { | |
| titleEl.text("Events"); | |
| } | |
| } | |
| // Run on initial page load | |
| updateFestivalTitle(); | |
| // Run after AJAX loads a new view | |
| $(document).on("tribe_events_after_ajax", function () { | |
| updateFestivalTitle(); | |
| }); | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment