[{"data":1,"prerenderedAt":419},["ShallowReactive",2],{"docs-/docs/widget/wordpress":3},{"id":4,"title":5,"body":6,"description":411,"extension":412,"meta":413,"navigation":414,"path":415,"seo":416,"stem":417,"__hash__":418},"content/docs/widget/wordpress.md","WordPress Installation",{"type":7,"value":8,"toc":401},"minimark",[9,13,18,21,55,131,139,146,150,153,181,184,188,191,227,231,234,353,357,362,376,380,383,397],[10,11,12],"p",{},"There are several ways to add the Grounded widget to WordPress. Choose the method that works best for your setup.",[14,15,17],"h2",{"id":16},"method-1-theme-footer-recommended","Method 1: Theme Footer (Recommended)",[10,19,20],{},"This is the simplest method for most WordPress sites.",[22,23,24,37,45,52],"ol",{},[25,26,27,28,32,33,36],"li",{},"Go to ",[29,30,31],"strong",{},"Appearance"," > ",[29,34,35],{},"Theme Editor"," in your WordPress admin",[25,38,39,40,44],{},"Select your theme's ",[41,42,43],"code",{},"footer.php"," file",[25,46,47,48,51],{},"Find the closing ",[41,49,50],{},"\u003C/body>"," tag",[25,53,54],{},"Paste the widget code just before it:",[56,57,62],"pre",{"className":58,"code":59,"language":60,"meta":61,"style":61},"language-html shiki shiki-themes github-dark","\u003Cscript\n  src=\"https://grounded.sh/widget/grounded-widget.js\"\n  data-chatbot-id=\"YOUR_CHATBOT_ID\"\n  async\n>\u003C/script>\n\u003C/body>\n","html","",[41,63,64,77,91,102,108,120],{"__ignoreMap":61},[65,66,69,73],"span",{"class":67,"line":68},"line",1,[65,70,72],{"class":71},"s95oV","\u003C",[65,74,76],{"class":75},"s4JwU","script\n",[65,78,80,84,87],{"class":67,"line":79},2,[65,81,83],{"class":82},"svObZ","  src",[65,85,86],{"class":71},"=",[65,88,90],{"class":89},"sU2Wk","\"https://grounded.sh/widget/grounded-widget.js\"\n",[65,92,94,97,99],{"class":67,"line":93},3,[65,95,96],{"class":82},"  data-chatbot-id",[65,98,86],{"class":71},[65,100,101],{"class":89},"\"YOUR_CHATBOT_ID\"\n",[65,103,105],{"class":67,"line":104},4,[65,106,107],{"class":82},"  async\n",[65,109,111,114,117],{"class":67,"line":110},5,[65,112,113],{"class":71},">\u003C/",[65,115,116],{"class":75},"script",[65,118,119],{"class":71},">\n",[65,121,123,126,129],{"class":67,"line":122},6,[65,124,125],{"class":71},"\u003C/",[65,127,128],{"class":75},"body",[65,130,119],{"class":71},[22,132,133],{"start":110},[25,134,135,136],{},"Click ",[29,137,138],{},"Update File",[140,141,143],"docs-callout",{"type":142},"warning",[10,144,145],{},"If you're using a block theme (FSE), see Method 3 below instead.",[14,147,149],{"id":148},"method-2-plugin-insert-headers-and-footers","Method 2: Plugin (Insert Headers and Footers)",[10,151,152],{},"If you prefer not to edit theme files:",[22,154,155,162,169,176],{},[25,156,157,158,161],{},"Install the ",[29,159,160],{},"Insert Headers and Footers"," plugin by WPBeginner",[25,163,27,164,32,167],{},[29,165,166],{},"Settings",[29,168,160],{},[25,170,171,172,175],{},"Paste the widget code in the ",[29,173,174],{},"Scripts in Footer"," section",[25,177,135,178],{},[29,179,180],{},"Save",[10,182,183],{},"This method survives theme updates automatically.",[14,185,187],{"id":186},"method-3-block-themes-full-site-editing","Method 3: Block Themes (Full Site Editing)",[10,189,190],{},"For WordPress 5.9+ block themes:",[22,192,193,200,206,213,220,223],{},[25,194,27,195,32,197],{},[29,196,31],{},[29,198,199],{},"Editor",[25,201,202,203,175],{},"Click the ",[29,204,205],{},"Template Parts",[25,207,208,209,212],{},"Edit the ",[29,210,211],{},"Footer"," template part",[25,214,215,216,219],{},"Add a ",[29,217,218],{},"Custom HTML"," block",[25,221,222],{},"Paste the widget code",[25,224,135,225],{},[29,226,180],{},[14,228,230],{"id":229},"method-4-functionsphp","Method 4: functions.php",[10,232,233],{},"For developers who prefer code:",[56,235,239],{"className":236,"code":237,"language":238,"meta":61,"style":61},"language-php shiki shiki-themes github-dark","// Add to your theme's functions.php\nfunction add_grounded_widget() {\n    ?>\n    \u003Cscript\n      src=\"https://grounded.sh/widget/grounded-widget.js\"\n      data-chatbot-id=\"YOUR_CHATBOT_ID\"\n      async\n    >\u003C/script>\n    \u003C?php\n}\nadd_action('wp_footer', 'add_grounded_widget');\n","php",[41,240,241,247,259,264,272,281,301,307,317,326,332],{"__ignoreMap":61},[65,242,243],{"class":67,"line":68},[65,244,246],{"class":245},"sAwPA","// Add to your theme's functions.php\n",[65,248,249,253,256],{"class":67,"line":79},[65,250,252],{"class":251},"snl16","function",[65,254,255],{"class":82}," add_grounded_widget",[65,257,258],{"class":71},"() {\n",[65,260,261],{"class":67,"line":93},[65,262,263],{"class":251},"    ?>\n",[65,265,266,269],{"class":67,"line":104},[65,267,268],{"class":251},"    \u003C",[65,270,76],{"class":271},"sDLfK",[65,273,274,277,279],{"class":67,"line":110},[65,275,276],{"class":271},"      src",[65,278,86],{"class":251},[65,280,90],{"class":89},[65,282,283,286,289,292,294,297,299],{"class":67,"line":122},[65,284,285],{"class":271},"      data",[65,287,288],{"class":251},"-",[65,290,291],{"class":271},"chatbot",[65,293,288],{"class":251},[65,295,296],{"class":271},"id",[65,298,86],{"class":251},[65,300,101],{"class":89},[65,302,304],{"class":67,"line":303},7,[65,305,306],{"class":271},"      async\n",[65,308,310,313,315],{"class":67,"line":309},8,[65,311,312],{"class":251},"    >\u003C/",[65,314,116],{"class":271},[65,316,119],{"class":251},[65,318,320,323],{"class":67,"line":319},9,[65,321,322],{"class":251},"    \u003C?",[65,324,325],{"class":271},"php\n",[65,327,329],{"class":67,"line":328},10,[65,330,331],{"class":71},"}\n",[65,333,335,338,341,344,347,350],{"class":67,"line":334},11,[65,336,337],{"class":82},"add_action",[65,339,340],{"class":71},"(",[65,342,343],{"class":89},"'wp_footer'",[65,345,346],{"class":71},", ",[65,348,349],{"class":89},"'add_grounded_widget'",[65,351,352],{"class":71},");\n",[14,354,356],{"id":355},"troubleshooting","Troubleshooting",[358,359,361],"h3",{"id":360},"widget-not-appearing","Widget Not Appearing",[22,363,364,367,370,373],{},[25,365,366],{},"Clear your WordPress and browser cache",[25,368,369],{},"Check for JavaScript errors in browser console (F12)",[25,371,372],{},"Verify the chatbot ID is correct",[25,374,375],{},"Ensure no security plugins are blocking external scripts",[358,377,379],{"id":378},"conflicts-with-other-plugins","Conflicts with Other Plugins",[10,381,382],{},"If the widget conflicts with other plugins:",[22,384,385,391,394],{},[25,386,387,388],{},"Try loading it with lower priority: ",[41,389,390],{},"add_action('wp_footer', 'add_grounded_widget', 99);",[25,392,393],{},"Check for jQuery conflicts if using older themes",[25,395,396],{},"Contact support with your site URL for help",[398,399,400],"style",{},"html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}",{"title":61,"searchDepth":79,"depth":79,"links":402},[403,404,405,406,407],{"id":16,"depth":79,"text":17},{"id":148,"depth":79,"text":149},{"id":186,"depth":79,"text":187},{"id":229,"depth":79,"text":230},{"id":355,"depth":79,"text":356,"children":408},[409,410],{"id":360,"depth":93,"text":361},{"id":378,"depth":93,"text":379},"Add Grounded chat widget to your WordPress site.","md",{},true,"/docs/widget/wordpress",{"title":5,"description":411},"docs/widget/wordpress","t8Abl1cOiyqawB_8ZoUs9hLR176uzCN-6XpEeDM8BIs",1778619021218]