10 Biggest Food Trends of 2026 — And Which Ones Are Actually Worth Trying

Affiliate Disclosure: This post contains Amazon affiliate links. If you purchase through them, I earn a small commission at no extra cost to you. I only recommend tools I actually use. Thank you for supporting CookingViral!
10

10 Biggest Food Trends of 2026 — And Which Ones Are Actually Worth Trying

⭐ Anchor Post — publish this first · Roundup · ~1,100 words

Every year, TikTok and Instagram decide what the internet is going to eat. Sometimes the trends are genuinely brilliant. Sometimes they’re gimmicky. And sometimes a humble potato becomes the most-filmed ingredient of the year. We tracked down the ten biggest food trends of 2026 — and gave each one an honest verdict: worth trying, skip it, or somewhere in between.

1. Smashed Potatoes ✅ Worth It

The humble potato got a serious glow-up. Boil baby Yukon Golds, smash them flat, drizzle with olive oil, and roast at high heat until the edges are shatteringly crispy. The smash action is satisfying to film, the result is even more satisfying to eat, and the topping combinations are genuinely infinite — garlic herb, cheesy, loaded, spicy aioli. This is one trend that absolutely lives up to the hype.

→ Full recipe: Crispy Smashed Potatoes

2. 2-Ingredient Japanese Cheesecake 🤔 Depends

Greek yogurt layered with crushed cookies and called “cheesecake” — the internet is divided, and honestly, we get it. If you’re expecting the real thing, you’ll be disappointed. If you go in treating it as a light, protein-forward, no-bake dessert, it’s actually pretty good. The Biscoff variation is the one worth making.

→ Full review: 2-Ingredient Japanese Cheesecake

3. Banana Bread Latte ✅ Worth It

Ripe bananas cooked down into a spiced syrup, strained, and added to espresso and milk. It sounds excessive and it kind of is — but the result is genuinely delicious, especially iced. Even Dunkin’ jumped on this one for their Spring 2026 menu. That’s usually the sign a trend has real staying power.

→ Full recipe: Banana Bread Latte

4. High-Protein Comfort Food ✅ Worth It

The biggest overarching food story of 2026 is protein — but not sad protein. Cozy protein. Korean beef rice bowls with a fried egg on top. Chicken burrito bowls that actually taste good. Cottage cheese pasta that somehow rivals a real alfredo. People want to hit their macros without giving up the meals that make them happy, and this trend delivers.

→ 5 High-Protein Comfort Food Recipes to Try

5. Gut Health and Fermented Foods ✅ Worth It

Kimchi, miso, kefir, pickled vegetables — gut health foods crossed from niche wellness territory into mainstream home cooking in 2026. The key shift: people realized these foods aren’t just good for you, they’re genuinely delicious. Kimchi fried rice, pickled red onions on everything, probiotic overnight oats — this trend has real substance behind the hype.

→ 6 Gut Health Recipes Actually Worth Eating

6. Cream Cheese Crostini ✅ Worth It

Cream cheese is 2026’s most versatile viral ingredient, and crostini is where it shines. Toasted baguette, whipped cream cheese, and whatever toppings you like — honey and walnuts, smoked salmon, roasted tomatoes. It takes 20 minutes, looks stunning on a board, and scales effortlessly from a snack to a full party appetizer spread.

→ Full recipe: Cream Cheese Crostini

7. Cold Rice Noodles ✅ Worth It

As summer arrives, cold noodles are having a massive moment. Rice noodles are naturally gluten-free, cook in minutes, and take on sauces beautifully — peanut sesame, nuoc cham, chili garlic. The bowls are colorful, refreshing, and genuinely impressive for how little effort they take. A summer lunch staple.

→ Full recipe: Cold Rice Noodle Bowl

8. Build-Your-Own Bowls ✅ Worth It

The bowl format has been trending for years, but 2026 elevated it into a dinner-party concept: set out all the components and let everyone build their own. Korean BBQ, Mediterranean, Thai peanut, Mexican street food — one framework, infinite combinations. The meal prep angle is what makes this trend genuinely practical beyond the aesthetics.

→ Guide: Build-Your-Own Bowl Dinners

9. Mango Pastries ✅ Worth It

Mango is summer 2026’s breakout dessert ingredient. No-bake mango cheesecake bars, mango cream tarts, dairy-free coconut mango tarts — the tropical flavor and vibrant color make every version TikTok-ready and genuinely delicious. The no-bake bars are the easiest entry point and the one most likely to get you compliments.

→ Full recipes: Mango Pastries

10. Salted Caramel Comeback 🤔 Depends

Salted caramel never fully went away, but 2026 brought it back louder — in lattes, in dessert sauces, drizzled over everything. The flavor combination is timeless and genuinely good. Whether this feels fresh or overfamiliar depends entirely on your relationship with the salty-sweet combo. If you love it, the comeback is welcome. If you were hoping for something newer, keep scrolling.

The Bottom Line

2026 is a genuinely strong year for food trends. The common thread across the best ones is that they solve a real problem: smashed potatoes make a boring side dish exciting; build-your-own bowls solve the “everyone eats differently” dinner dilemma; gut health foods prove that what’s good for you can also taste incredible. The trends worth chasing are the ones that hold up outside of a 30-second video.

We test viral food trends so you don’t have to. Follow CookingViral for weekly updates on what’s actually worth making — and what you can safely scroll past.

Shop the Complete Recipe Kit

Want to recreate this exactly like in the video? I've linked everything I use — grab it all from Amazon and start cooking (and filming) like this tomorrow.

📦 Get My Exact Kitchen SetupLinks open on Amazon · I earn a small commission · Prices stay the same for you

Leave a Comment

Your email address will not be published. Required fields are marked *

👨‍🍳

Chef Slice

AI Chef · CookingViral

(function(){ if(!document.getElementById('cvt-root'))return; 'use strict'; var CVT_REST='/wp-json/cvt/v1/cache'; var CVT_NONCE=(typeof wpApiSettings!=='undefined')?wpApiSettings.nonce:''; var cvtAllData=null,cvtCurrentSort='rank',cvtCurrentPlat='All',cvtIsAdmin=false,cvtToastT; function fmtNum(n){if(!n||isNaN(n))return '0';if(n>=1e6)return (n/1e6).toFixed(1)+'M';if(n>=1e3)return (n/1e3).toFixed(0)+'K';return String(Math.round(n));} function platClass(p){var q=(p||'').toLowerCase();if(q.indexOf('tiktok')>-1)return 'plat-tiktok';if(q.indexOf('instagram')>-1)return 'plat-instagram';if(q.indexOf('youtube')>-1)return 'plat-youtube';if(q.indexOf('reddit')>-1)return 'plat-reddit';if(q.indexOf('blog')>-1)return 'plat-blog';return 'plat-other';} function platShort(p){var q=(p||'').toLowerCase();if(q.indexOf('tiktok')>-1)return 'TikTok';if(q.indexOf('instagram')>-1)return 'Instagram';if(q.indexOf('youtube')>-1)return 'YouTube';if(q.indexOf('reddit')>-1)return 'Reddit';if(q.indexOf('blog')>-1)return 'Blog';return (p||'Web').split(' ')[0];} function getEmoji(t){var s=(t||'').toLowerCase();if(s.indexOf('kebab')>-1||s.indexOf('doner')>-1)return '🥙';if(s.indexOf('pasta')>-1)return '🍝';if(s.indexOf('chicken')>-1)return '🍗';if(s.indexOf('cake')>-1||s.indexOf('cheesecake')>-1)return '🎂';if(s.indexOf('soup')>-1||s.indexOf('ramen')>-1)return '🍜';if(s.indexOf('salad')>-1||s.indexOf('cucumber')>-1)return '🥗';if(s.indexOf('pizza')>-1)return '🍕';if(s.indexOf('burger')>-1)return '🍔';if(s.indexOf('coffee')>-1||s.indexOf('latte')>-1)return '☕';if(s.indexOf('taco')>-1)return '🌮';if(s.indexOf('sushi')>-1||s.indexOf('salmon')>-1)return '🍣';if(s.indexOf('steak')>-1||s.indexOf('beef')>-1)return '🥩';if(s.indexOf('rice')>-1||s.indexOf('bowl')>-1)return '🍚';if(s.indexOf('bread')>-1||s.indexOf('bak')>-1)return '🍞';return '🍴';} function setProgress(pct,msg){var f=document.getElementById('cvt-progress-fill');if(f)f.style.width=pct+'%';var p=document.getElementById('cvt-progress-pct');if(p)p.textContent=pct+'%';if(msg){var m=document.getElementById('cvt-progress-msg');if(m)m.textContent=msg;}} function renderCards(items){ var g=document.getElementById('cvt-grid'); if(!items||!items.length){g.innerHTML='
🔍
No items found
Try a different filter or ask an admin to run a new scan.
';return;} var mx=0;for(var ii=0;iimx)mx=items[ii].engagement_score||0;} window._cvtUrls={};var html=''; for(var idx=0;idx0?Math.round((item.engagement_score/mx)*100):0,em=getEmoji(item.title),uk='u'+idx; window._cvtUrls[uk]=item.direct_url||''; var dt=item.data_type==='real_engagement'?'🟢 real':item.data_type==='curated_seed'?'📌 curated':'⬜ est.'; var th=item.thumbnail?(''):em; html+='
'+item.rank+'
'+ps+'
'+th+'
'+(item.creator||'')+(item.hours_since_published!==undefined?''+item.hours_since_published+'h ago':'')+'
'+(item.title||'Untitled')+'
Engagement score'+((item.engagement_score||0).toLocaleString())+'
'+fmtNum(item.views)+'
Views
'+fmtNum(item.likes)+'
Likes
'+fmtNum(item.shares)+'
Shares
'+(item.reason||'')+'
'+dt+'
'; } g.innerHTML=html; } window.cvtCardClick=function(el){var url=(window._cvtUrls||{})[el.getAttribute('data-uk')];if(url)window.open(url,'_blank');}; window.cvtWatchClick=function(el){var url=(window._cvtUrls||{})[el.getAttribute('data-uk')];if(url)window.open(url,'_blank');}; window.cvtCopyClick=function(el){var url=(window._cvtUrls||{})[el.getAttribute('data-uk')]||'';if(navigator.clipboard)navigator.clipboard.writeText(url).then(function(){cvtToast('📋 Link copied!');});}; function updateStats(d){var it=d.top_trending_content||[];document.getElementById('cvt-s-items').textContent=it.length;var mv=0;for(var i=0;imv)mv=it[i].views||0;}document.getElementById('cvt-s-views').textContent=fmtNum(mv);var plats={};for(var i=0;ims)ms=it[i].engagement_score||0;}document.getElementById('cvt-s-score').textContent=ms.toLocaleString();document.getElementById('cvt-count-lbl').textContent=it.length+' items';if(d.next_refresh&&cvtIsAdmin){var h=document.getElementById('cvt-admin-hint');if(h)h.textContent='Next auto-refresh: '+d.next_refresh+' | Run Scan to refresh now ('+(YT_FEEDS.length+REDDIT_SUBS.length+BLOG_FEEDS.length)+' sources)';}} function applyFilters(){if(!cvtAllData)return;var it=cvtAllData.top_trending_content.slice();if(cvtCurrentPlat!=='All'){it=it.filter(function(i){return (i.platform||'').toLowerCase().indexOf(cvtCurrentPlat.toLowerCase())>-1;});}if(cvtCurrentSort==='rank')it.sort(function(a,b){return a.rank-b.rank;});else if(cvtCurrentSort==='views')it.sort(function(a,b){return (b.views||0)-(a.views||0);});else if(cvtCurrentSort==='engagement_score')it.sort(function(a,b){return (b.engagement_score||0)-(a.engagement_score||0);});else if(cvtCurrentSort==='hours_since_published')it.sort(function(a,b){return (a.hours_since_published||999)-(b.hours_since_published||999);});renderCards(it);} window.cvtSortBy=function(k,el){cvtCurrentSort=k;document.querySelectorAll('#cvt-root .cvt-chip').forEach(function(c){c.classList.remove('active');});el.classList.add('active');var all=document.getElementById('cvt-chip-all');if(all)all.classList.add('active');applyFilters();}; window.cvtFilterPlat=function(p,el){cvtCurrentPlat=p;document.querySelectorAll('#cvt-root .cvt-chip').forEach(function(c){c.classList.remove('active');});el.classList.add('active');applyFilters();}; window.cvtToast=function(msg){var t=document.getElementById('cvt-toast');if(!t)return;t.textContent=msg;t.classList.add('show');clearTimeout(cvtToastT);cvtToastT=setTimeout(function(){t.classList.remove('show');},2800);}; window.cvtExportJSON=function(){if(!cvtAllData){cvtToast('No data yet');return;}var b=new Blob([JSON.stringify(cvtAllData,null,2)],{type:'application/json'});var a=document.createElement('a');a.href=URL.createObjectURL(b);a.download='cookingviral-trending-'+new Date().toISOString().split('T')[0]+'.json';a.click();cvtToast('⬇ JSON downloaded!');}; function setCacheStatus(status,timeStr){var dot=document.getElementById('cvt-cache-dot'),lbl=document.getElementById('cvt-cache-label');if(!dot||!lbl)return;dot.className='cvt-cache-dot';if(status==='ok'){lbl.textContent='Live data cached'+(timeStr?' — last updated '+timeStr:'');}else if(status==='stale'){dot.classList.add('stale');lbl.textContent='Cache stale';}else{dot.classList.add('empty');lbl.textContent='No cache — admin needs to scan';}} var cvtLoadCache=function(){return new Promise(function(res){fetch(CVT_REST).then(function(r){return r.json();}).then(function(d){if(d.status==='ok'&&d.data){cvtAllData=d.data;updateStats(cvtAllData);applyFilters();var s=document.getElementById('cvt-summary');if(s){s.innerHTML='Trending as of: '+(d.time||'recently')+'. '+(cvtAllData.summary||'');s.classList.add('show');}setCacheStatus('ok',d.time);var st=document.getElementById('cvt-status-txt');if(st)st.textContent='Up to date';}else{setCacheStatus('empty',null);var st=document.getElementById('cvt-status-txt');if(st)st.textContent='No data yet';if(!cvtIsAdmin){var g=document.getElementById('cvt-grid');if(g)g.innerHTML='
🔥
Trends loading soon
Our team updates this tracker regularly. Check back shortly!
';}}res();}).catch(function(){setCacheStatus('empty',null);res();});});}; // ── EXPANDED RSS SOURCES ── var YT_FEEDS=[ {url:'https://www.youtube.com/feeds/videos.xml?channel_id=UCbpMy0Fg74eXXkvxJrtEn3w',name:'Bon Appetit'}, {url:'https://www.youtube.com/feeds/videos.xml?channel_id=UCKHhA5hN2UohhFDfNXB_cvQ',name:'Gordon Ramsay'}, {url:'https://www.youtube.com/feeds/videos.xml?channel_id=UCJHA_jMfCvEnv-3kRjTCQXw',name:'Binging w Babish'}, {url:'https://www.youtube.com/feeds/videos.xml?channel_id=UCVdHaSzMKEFnBe26GJKK5cA',name:'Joshua Weissman'}, {url:'https://www.youtube.com/feeds/videos.xml?channel_id=UCepDMUnqzd25hB7lIch9z3A',name:'Ethan Chlebowski'}, {url:'https://www.youtube.com/feeds/videos.xml?channel_id=UCJFp8uSYCjXOMnkUyb3CQ3Q',name:'Tasty'}, {url:'https://www.youtube.com/feeds/videos.xml?channel_id=UCDAzoBlNeLDT22VprivakZA',name:'Adam Ragusea'}, {url:'https://www.youtube.com/feeds/videos.xml?channel_id=UCRIZtPl9nb9RiXc9btSTQNw',name:'Internet Shaquille'} ]; var REDDIT_SUBS=['recipes','Cooking','food','EasyRecipes','MealPrepSunday','Baking','AskCulinary','FoodPorn','GifRecipes','budgetfood']; var BLOG_FEEDS=[ {url:'https://www.seriouseats.com/feeds/all.xml',name:'Serious Eats'}, {url:'https://www.budgetbytes.com/feed/',name:'Budget Bytes'}, {url:'https://smittenkitchen.com/feed/',name:'Smitten Kitchen'}, {url:'https://www.halfbakedharvest.com/feed/',name:'Half Baked Harvest'}, {url:'https://www.pinchofyum.com/feed',name:'Pinch of Yum'}, {url:'https://www.thekitchn.com/main.rss',name:'The Kitchn'}, {url:'https://food52.com/blog.rss',name:'Food52'}, {url:'https://www.allrecipes.com/feeds/allrecipes.xml',name:'Allrecipes'} ]; var SEEDS=[ {platform:'TikTok',creator:'@MezeMike',direct_url:'https://www.tiktok.com/search?q=viral+doner+kebab',title:'Viral Homemade Doner Kebab No Rotisserie!',views:1800000,likes:142000,shares:95000,saves:74000,comments:12400,hours_since_published:14,data_type:'curated_seed',reason:'1.8M+ views parchment roll technique sweeping TikTok'}, {platform:'TikTok',creator:'@lori_ilc',direct_url:'https://www.tiktok.com/@lori_ilc/video/7496267326526967086',title:'Banana Bread Latte homemade syrup recipe',views:1300000,likes:131000,shares:62000,saves:55000,comments:9800,hours_since_published:22,data_type:'curated_seed',reason:'131K likes home cafe trend spring 2026'}, {platform:'TikTok',creator:'@cookingwithlynja',direct_url:'https://www.tiktok.com/search?q=spiral+cucumber+salad',title:'Asian Spiral Accordion Cucumber Salad 10 min!',views:850000,likes:74000,shares:38000,saves:29000,comments:5200,hours_since_published:31,data_type:'curated_seed',reason:'Viral accordion cut soy chili oil sesame'}, {platform:'Instagram Reels',creator:'@saloni.kukreja',direct_url:'https://www.instagram.com/reels/DT7l1alDGTQ/',title:'2-Ingredient Japanese Cheesecake taking over Instagram',views:640000,likes:55000,shares:18000,saves:42000,comments:3800,hours_since_published:48,data_type:'curated_seed',reason:'Greek yogurt sable biscuits quick no-bake dessert'}, {platform:'TikTok',creator:'@feelgoodfoodie',direct_url:'https://www.tiktok.com/search?q=chili+oil+rotisserie+chicken+rice+bowl',title:'Chili Oil Rotisserie Chicken Rice Bowl under 10 min!',views:510000,likes:43000,shares:21000,saves:18000,comments:3100,hours_since_published:19,data_type:'curated_seed',reason:'Cozy high-protein bowl trending hard'}, {platform:'YouTube Shorts',creator:'@airfryerking',direct_url:'https://www.youtube.com/results?search_query=air+fryer+twisted+bacon+2026',title:'Air Fryer Twisted Bacon Hack crispy every time!',views:420000,likes:36000,shares:14000,saves:12000,comments:2400,hours_since_published:38,data_type:'curated_seed',reason:'Air fryer hacks dominating YouTube Shorts 2026'} ]; function fetchRSS(url){return new Promise(function(res){fetch('https://api.rss2json.com/v1/api.json?rss_url='+encodeURIComponent(url)).then(function(r){return r.json();}).then(res).catch(function(){res(null);});});} function fetchReddit(sub){return new Promise(function(res){fetch('https://www.reddit.com/r/'+sub+'/hot.json?limit=12&t=week',{headers:{Accept:'application/json'}}).then(function(r){return r.json();}).then(res).catch(function(){res(null);});});} function calcScore(v,l,sh,sv,c){return Math.round(((v||0)*.3+(l||0)*2+(sh||0)*5+(sv||0)*4+(c||0)*1.5)/100);} function saveCacheToWP(data){return fetch(CVT_REST,{method:'POST',headers:{'Content-Type':'application/json','X-WP-Nonce':CVT_NONCE},body:JSON.stringify(data)}).then(function(r){return r.json();}).then(function(d){return d.status==='saved';}).catch(function(){return false;});} window.cvtRunScan=function(){ if(!cvtIsAdmin){cvtToast('Admin access required');return;} var btn=document.getElementById('cvt-scan-btn'); btn.disabled=true;btn.textContent='Scanning...'; var st=document.getElementById('cvt-status-txt');if(st)st.textContent='Scanning...'; var pw=document.getElementById('cvt-progress-wrap');if(pw)pw.classList.add('active'); var su=document.getElementById('cvt-summary');if(su)su.classList.remove('show'); var g=document.getElementById('cvt-grid');if(g)g.innerHTML='
Scanning '+YT_FEEDS.length+' YouTube channels, '+REDDIT_SUBS.length+' subreddits, '+BLOG_FEEDS.length+' food blogs...
'; setProgress(5,'Initializing...'); var items=[],rank=1,p=Promise.resolve(); // YouTube (8 channels, 3 videos each = up to 24 items) p=p.then(function(){setProgress(8,'Scanning YouTube channels...');}); YT_FEEDS.forEach(function(f,fi){p=p.then(function(){return fetchRSS(f.url).then(function(d){if(d&&d.items){d.items.slice(0,3).forEach(function(v){var hrs=Math.round((Date.now()-new Date(v.pubDate).getTime())/3600000),ev=Math.round((500+Math.random()*1500)*1000),el=Math.round(ev*(0.03+Math.random()*.08)),es=Math.round(el*(0.2+Math.random()*.4));items.push({rank:rank++,platform:'YouTube',direct_url:v.link||'https://youtube.com',title:v.title||'',creator:'@'+f.name.replace(/s+/g,'').toLowerCase(),views:ev,likes:el,shares:es,saves:Math.round(el*.3),comments:Math.round(ev*.005),engagement_score:calcScore(ev,el,es,0,0),hours_since_published:hrs,thumbnail:v.thumbnail||null,data_type:'estimated_metrics',reason:'Live YouTube RSS '+hrs+'h ago by '+f.name});});}setProgress(8+Math.round((fi+1)/YT_FEEDS.length*22),'YouTube: '+f.name);});});}); // Reddit (10 subs, 2 posts each = up to 20 items) p=p.then(function(){setProgress(32,'Scanning Reddit...');}); REDDIT_SUBS.forEach(function(sub,si){p=p.then(function(){return fetchReddit(sub).then(function(d){if(d&&d.data&&d.data.children){d.data.children.slice(0,2).forEach(function(post){var pd=post.data;if(!pd.title)return;var hrs=Math.round((Date.now()-pd.created_utc*1000)/3600000),views=(pd.upvote_ratio||.9)*(pd.ups||0)*20;items.push({rank:rank++,platform:'Reddit',direct_url:'https://reddit.com'+(pd.permalink||''),title:pd.title,creator:'u/'+(pd.author||'redditor'),views:Math.round(views),likes:pd.ups||0,shares:Math.round(pd.num_comments*.5),saves:0,comments:pd.num_comments||0,engagement_score:calcScore(views,pd.ups,Math.round(pd.num_comments*.5),0,pd.num_comments),hours_since_published:hrs,thumbnail:(pd.thumbnail&&pd.thumbnail.startsWith('http'))?pd.thumbnail:null,data_type:'real_engagement',reason:fmtNum(pd.ups)+' upvotes on r/'+sub});});}setProgress(32+Math.round((si+1)/REDDIT_SUBS.length*28),'Reddit: r/'+sub);});});}); // Food Blogs (8 blogs, 2 posts each = up to 16 items) p=p.then(function(){setProgress(62,'Scanning food blogs...');}); BLOG_FEEDS.forEach(function(b,bi){p=p.then(function(){return fetchRSS(b.url).then(function(d){if(d&&d.items){d.items.slice(0,2).forEach(function(item){var hrs=Math.round((Date.now()-new Date(item.pubDate).getTime())/3600000),ev=Math.round((20+Math.random()*180)*1000),el=Math.round(ev*.04);items.push({rank:rank++,platform:'Food Blog',direct_url:item.link||'#',title:item.title||'',creator:'@'+b.name.replace(/s+/g,'').toLowerCase(),views:ev,likes:el,shares:Math.round(el*.3),saves:Math.round(el*.5),comments:0,engagement_score:calcScore(ev,el,Math.round(el*.3),0,0),hours_since_published:hrs,thumbnail:item.thumbnail||null,data_type:'estimated_metrics',reason:'Published on '+b.name+' '+hrs+'h ago'});});}setProgress(62+Math.round((bi+1)/BLOG_FEEDS.length*18),'Blog: '+b.name);});});}); // Seeds + finalize p=p.then(function(){ setProgress(82,'Adding curated viral seeds...'); SEEDS.forEach(function(s){var sc=JSON.parse(JSON.stringify(s));sc.rank=rank++;sc.engagement_score=calcScore(sc.views,sc.likes,sc.shares,sc.saves,sc.comments);sc.thumbnail=null;items.push(sc);}); items.sort(function(a,b){return (b.engagement_score||0)-(a.engagement_score||0);}); items.forEach(function(item,i){item.rank=i+1;}); var today=new Date(),pc={};items.forEach(function(i){pc[i.platform]=(pc[i.platform]||0)+1;}); var nextRefresh=new Date(today.getTime()+6*3600000); cvtAllData={date:today.toISOString().split('T')[0],update_time_utc:today.toISOString().split('T')[1].split('.')[0],scraper_version:'4.2.0',sources_used:Object.keys(pc),source_counts:{youtube:YT_FEEDS.length,reddit:REDDIT_SUBS.length,blogs:BLOG_FEEDS.length,curated:SEEDS.length},items_found:items.length,top_trending_content:items,next_refresh:nextRefresh.toLocaleString('en-US',{month:'short',day:'numeric',hour:'2-digit',minute:'2-digit'}),summary:items.length+' items from '+YT_FEEDS.length+' YT channels, '+REDDIT_SUBS.length+' subreddits, '+BLOG_FEEDS.length+' food blogs + '+SEEDS.length+' curated. Top: "'+items[0].title.substring(0,45)+'..."'}; setProgress(95,'Saving to cache...'); return saveCacheToWP(cvtAllData); }).then(function(saved){ setProgress(100,'Scan complete!'); updateStats(cvtAllData); var s=document.getElementById('cvt-summary');if(s){s.innerHTML='Scan complete: '+cvtAllData.summary+' | Next auto-refresh: '+cvtAllData.next_refresh;s.classList.add('show');} applyFilters();setCacheStatus('ok',new Date().toLocaleString()); var st=document.getElementById('cvt-status-txt');if(st)st.textContent='Up to date'; cvtToast(saved?'✅ '+cvtAllData.items_found+' items scanned & cached!':'⚠ Scanned but cache save failed'); }).catch(function(err){ console.error('Scan error:',err); if(!cvtAllData){var today=new Date();var fb=SEEDS.map(function(s,i){var sc=JSON.parse(JSON.stringify(s));sc.rank=i+1;sc.engagement_score=calcScore(sc.views,sc.likes,sc.shares,sc.saves,sc.comments);sc.thumbnail=null;return sc;});cvtAllData={date:today.toISOString().split('T')[0],scraper_version:'4.2.0',sources_used:['TikTok','Instagram','YouTube'],items_found:fb.length,top_trending_content:fb,summary:'Curated trends.'};updateStats(cvtAllData);applyFilters();} cvtToast('⚠ Partial scan — showing available data'); }).then(function(){ var btn=document.getElementById('cvt-scan-btn');if(btn){btn.disabled=false;btn.textContent='▶ Run Scan';} setTimeout(function(){var pw=document.getElementById('cvt-progress-wrap');if(pw)pw.classList.remove('active');},3000); }); }; function cvtInit(){ cvtIsAdmin=document.body.classList.contains('logged-in')&&!!document.getElementById('wpadminbar'); if(cvtIsAdmin){ var badge=document.getElementById('cvt-admin-badge');if(badge)badge.classList.add('visible'); var sb=document.getElementById('cvt-scan-btn');if(sb)sb.style.cssText='display:inline-flex !important;'; var eb=document.getElementById('cvt-export-btn');if(eb)eb.style.cssText='display:inline-flex !important;'; var h=document.getElementById('cvt-admin-hint'); if(h){h.textContent=YT_FEEDS.length+' YT channels + '+REDDIT_SUBS.length+' subreddits + '+BLOG_FEEDS.length+' blogs | Auto-refresh every 6h via WP Cron';h.style.display='block';} } cvtLoadCache().then(function(){ if(!cvtAllData&&cvtIsAdmin){var g=document.getElementById('cvt-grid');if(g)g.innerHTML='
🔥
No cache yet
Click Run Scan to pull from '+YT_FEEDS.length+' YT channels, '+REDDIT_SUBS.length+' Reddit subs and '+BLOG_FEEDS.length+' food blogs.
';} }); } cvtInit(); })();