Dominio Email & Office Sito web Sito WP Hosting Strumenti
Indietro
.com
$ 7.99 $ 26.99 /1 ° anno
.io
$ 9.99 $ 66.99 /1 ° anno
Indietro
Accedi
Pannello di controllo Webmail Editor Web E-commerce File Manager WordPress

Cosa sono e a cosa servono i tag in WordPress?

Tutto quello che c’è da sapere sui tag WordPress

Lo scopo dei tag in WordPress è categorizzare i post. Pertanto, nei tuoi post su WordPress dovresti utilizzare i tag per consentire alle persone di trovare post simili a quelli a cui sono interessati. Per esempio, i tag sono importanti se scrivi diversi blog post o articoli sullo stesso argomento. Creando uno specifico tag in WordPress, aiuterai il ​​lettore a trovare altri post simili a quello che sta leggendo.

Come usare i tag in WordPress

Dovresti trattare i tag di WordPress come le parole chiave. Quali sono le principali parole chiave che descrivono il blog post che hai scritto? Se di recente hai scritto un articolo sulla destinazione di un viaggio, per esempio su Barcellona, ​​tra i tuoi tag non dovrebbero mancare: viaggio, Barcellona, ​​Spagna, vacanza, sole ecc. I tag sono un ottimo modo per le persone di trovare argomenti simili a quelli a cui sono interessati, senza perdere anni a doverli cercare all’interno del tuo sito web.

Come inserire meta tag su WordPress

Se vuoi sapere come iniziare a lavorare con i tag di WordPress, siamo qui per questo. Innanzitutto, vai alla dashboard di WordPress e scegli i tag sotto i post. Troverai i tag solo sotto i post, poiché in WordPress i tag possono essere applicati solo ai post.

Se hai già lavorato con i tag, vedrai un elenco di tag esistenti; potrebbe essere un elenco del tutto simile a quello che abbiamo menzionato poc’anzi. In caso contrario, non vedrai nessun elenco, ma potrai iniziare ad aggiungere nuovi tag. Scegli le parole chiave che ritieni si adattino meglio a descrivere un tuo post o articolo del blog e aggiungile come tag.

Dopo aver creato il tuo nuovo tag, torna al tuo post, fai clic su tag, sul lato destro del tuo editor di WordPress e scrivi il tag che hai appena creato e aggiunto. Devi solo scrivere una o due lettere, il completamento automatico farà il resto, inserendo il tag corrispondente a ciò che hai digitato. Se lo desideri, puoi selezionare diversi tag.

Puoi creare nuovi tag anche scrivendo direttamente la parola chiave nel tuo editor, senza aggiungerla prima alla sezione tag della dashboard di WordPress. Tuttavia, è sempre meglio creare un tag nella dashboard, così da avere una chiara panoramica di tutti i tuoi tag e di quelli che mancano al tuo elenco.

Inoltre, se desideri eliminare un tag, potrai farlo sempre nella sezione tag della dashboard di WordPress. Se passi il mouse sul tag, visualizzerai cancella. Lo stesso vale se vuoi modificare il tag; clicca su modifica per apportare i cambiamenti che desideri.

Troverai i tag nella parte inferiore del tuo post ed essi verranno visualizzati come collegamenti, in modo che i tuoi lettori, cliccando su di essi, possano essere reindirizzati a un elenco di post/articoli del blog che includono lo stesso tag. Un modo semplicissimo per trovare argomenti simili!

' html += '
' html += '' + ocKeys[locale].allPlans + '' html += '
' return html; } function ocGetLocale() { var localString = document.getElementsByTagName('html')[0].getAttribute("lang"); if (!localString) { return "en"; } if (localString.indexOf('-') === -1) { return localString; } return localString.split("-")[0] } function isInViewport(element) { var rect = element.getBoundingClientRect(); return ( rect.top >= 0 && rect.left >= 0 && rect.top <= (window.innerHeight || osShadowElement.documentElement.clientHeight) && rect.right <= (window.innerWidth || osShadowElement.documentElement.clientWidth) ); } function ocLogBuyClick(e) { if (!e.target.classList.contains("onecom_plans_cta_main")) { return; } var parent = e.target.parentNode.parentNode.parentNode.parentNode.parentNode; window.dataLayer.push({ event: "addToCart", ecommerce: { currencyCode: parent.getAttribute("data-currency"), add: { actionField: { list: document.getElementsByTagName('h1')[0].textContent }, products: [ { id: parent.getAttribute("data-title"), name: parent.getAttribute("data-title"), brand: "one.com", category: "pps", variant: parent.getAttribute("data-plan"), location: document.getElementsByTagName('h1')[0].textContent, price: parent.getAttribute("data-price"), quantity: 1 } ] } } }); } function ocLogTrackingInfo(e) { if ((e.getAttribute("data-marked") !== "1") || (!dataLayer)) { return; } e.removeAttribute("data-marked"); if (!e.getAttribute("data-title") || e.getAttribute("data-fresh") !== "1") { return; } console.info("push initiated") window.dataLayer.push({ id: e.getAttribute("data-title"), name: e.getAttribute("data-title"), brand: "one.com", category: "pps", variant: e.getAttribute("data-plan"), list: "/" + ocGetLocale() + "/", location: document.getElementsByTagName('h1')[0].textContent, price: e.getAttribute("data-price"), position: e.getAttribute("data-position") } ); e.setAttribute("data-fresh", "0"); } function ocSetImpression() { var plans = document.getElementsByClassName('oc-plan-container'); for (var i = 0; i < plans.length; i++) { if (isInViewport(plans[i])) { ocLogTrackingInfo(plans[i]); } } } function ocProductImpression(e) { var plans = document.getElementsByClassName('oc-plan-container'); for (var i = 0; i < plans.length; i++) { if (isInViewport(plans[i])) { plans[i].setAttribute("data-marked", "1"); ocTimeout = setTimeout(ocSetImpression, 2000) } } } /* var headingTag = window.location.hash.substr(1); if(headingTag.length > 0){ console.log(headingTag); osShadowElement.querySelector('#'+headingTag).scrollIntoView(); } */ //frontpage function scrollSmooth() { var elmntToView = osShadowElement.querySelector("#oc-plansandprices"); elmntToView.scrollIntoView({ behavior: "smooth", block: "start", inline: "nearest" }); } const rightBtn = osShadowElement.querySelector('#right-button'); const leftBtn = osShadowElement.querySelector('#left-button'); if (rightBtn && leftBtn) { rightBtn.addEventListener("click", function (event) { const conent = osShadowElement.querySelector('#content'); conent.scrollLeft += 100; event.preventDefault(); let activeElement = osShadowElement.querySelector(".banner-thumb.active"); if (osShadowElement.querySelector(".banner-menu li:last-child").classList.contains('active')) { osShadowElement.querySelector(".banner-menu li:first-child").click(); } else { if (activeElement.nextElementSibling) { activeElement.nextElementSibling.click(); } } }); leftBtn.addEventListener("click", function (event) { const conent = osShadowElement.querySelector('#content'); conent.scrollLeft -= 100; event.preventDefault(); let activeElement = osShadowElement.querySelector(".banner-thumb.active"); if (osShadowElement.querySelector(".banner-menu li:first-child").classList.contains('active')) { osShadowElement.querySelector(".banner-menu li:last-child").click(); } else { if (activeElement.previousElementSibling) { activeElement.previousElementSibling.click(); } } }); } function nextSlide(thumbClass) { if (thumbClass.length > 0) { var elements = osShadowElement.querySelectorAll(".banner-section"); for (var i = 0, len = elements.length; i < len; i++) { elements[i].style.display = "none"; } var elements = osShadowElement.querySelectorAll(".banner-thumb"); for (var i = 0, len = elements.length; i < len; i++) { elements[i].classList.remove("active"); } var elmntToView = osShadowElement.querySelector('.banner-section-' + thumbClass); elmntToView.scrollIntoView({ behavior: "smooth", block: "start", inline: "nearest" }); var menuClicked = osShadowElement.querySelector('.banner-thumb-' + thumbClass); menuClicked.classList.add("active"); menuClicked.scrollIntoView(); osShadowElement.querySelector('.banner-section-' + thumbClass).style.display = "block"; } } const accordionTitlesSuccess = osShadowElement.querySelectorAll(".success-steps-col"); accordionTitlesSuccess.forEach((accordionTitle) => { accordionTitle.addEventListener("click", () => { if (accordionTitle.classList.contains("active")) { accordionTitle.classList.remove("active"); } else { const accordionTitlesWithIsOpen = document.querySelectorAll(".success-steps-col"); accordionTitlesWithIsOpen.forEach((accordionTitleWithIsOpen) => { accordionTitleWithIsOpen.classList.remove("active"); }); accordionTitle.classList.add("active"); } }); }); const accordionTitlesFaq = osShadowElement.querySelectorAll(".faq-col"); accordionTitlesFaq.forEach((accordionTitle) => { accordionTitle.addEventListener("click", () => { if (accordionTitle.classList.contains("active")) { accordionTitle.classList.remove("active"); } else { const accordionTitlesWithIsOpen = document.querySelectorAll(".faq-col"); accordionTitlesWithIsOpen.forEach((accordionTitleWithIsOpen) => { accordionTitleWithIsOpen.classList.remove("active"); }); accordionTitle.classList.add("active"); } }); }); (function () { slide('right'); })(); /***script to call APIs starts here**/ function checkStatus(response) { if (response.status >= 200 && response.status < 300) { return Promise.resolve(response); } else { return Promise.reject(new Error(response.statusText)); } } function parseJson(response) { return response.json(); } function niceRounding(stringDigit) { var lastDigit = stringDigit.at(-1); if (lastDigit == 8) { stringDigit = stringDigit.replace(/.$/, "9"); } return stringDigit; } /***script to call APIs ends here**/ /**Glosssary page***/ function scrollSmoothGlossary(alphabet) { var alphaList = osShadowElement.querySelectorAll(".alphabet-list"); for (let i = 0; i < alphaList.length; i++) { alphaList[i].classList.remove("active"); } var activeAlpha = osShadowElement.querySelector(".alpha-" + alphabet); activeAlpha.classList.add("active"); var elmntToView = osShadowElement.querySelector("#div-" + alphabet); //elmntToView.scrollTop = elmntToView.scrollHeight; elmntToView.scrollIntoView({ behavior: "smooth" }); //elmntToView.scrollTop(elmntToView.scrollHeight); } /**searching**/ const $search = osShadowElement.getElementById('search-glossary'); if ($search) { $search.addEventListener('input', (event) => { const searchText = event.target.value; const regex = new RegExp(searchText, 'gi'); const noSearchDiv = osShadowElement.querySelector(".no-glossary-search-found"); const itemList = osShadowElement.querySelectorAll(".oc-glossary-item-articles"); //const articleList = osShadowElement.querySelectorAll(".item-article"); var mainCount = 0; for (let j = 0; j < itemList.length; j++) { var articleList = itemList[j].querySelectorAll(".item-article"); var countDisplayBlock = 0; for (let i = 0; i < articleList.length; i++) { var h3 = articleList[i].getElementsByTagName("a")[0]; var text = h3.innerHTML; text = text.replace(/(|<\/mark>)/gim, ''); const newText = text.replace(regex, '$&'); h3.innerHTML = newText; if (text !== newText) { articleList[i].style.display = "flex"; countDisplayBlock++; } else { articleList[i].style.display = "none"; } } if (countDisplayBlock === 0) { itemList[j].parentNode.parentNode.style.display = "none"; } else { itemList[j].parentNode.parentNode.style.display = "flex"; mainCount++; } } if (mainCount === 0) { noSearchDiv.classList.remove("hidden"); } else { noSearchDiv.classList.add("hidden"); } }); } var select = osShadowElement.getElementById('alphabet-mobile-select'); if (select) { select.onchange = function () { var alphabet = this.options[this.selectedIndex].value; this.options[this.selectedIndex].classList.add('active'); scrollSmoothGlossary(alphabet); //var elmntToView = osShadowElement.querySelector("#" + alphabet); //elmntToView.scrollIntoView({behavior: "smooth", block: "start", inline: "nearest"}); }; } var glossaryHeader = osShadowElement.getElementById("glossary-header"); var glossaryStickyHeader = osShadowElement.getElementById( "glossary-header-sticky" ); // Get the offset position of the navbar if (glossaryHeader) { var sticky = glossaryHeader.offsetTop; } var glossarySearch = osShadowElement.querySelector(".oc-glossary-search"); // Add the sticky class to the navbar when you reach its scroll position. Remove "sticky" when you leave the scroll position function stickyAlphabets() { if (window.pageYOffset > sticky) { glossaryHeader.classList.add("hidden"); glossaryStickyHeader.classList.remove("hidden"); glossaryStickyHeader.style.zIndex = "99999"; glossarySearch.classList.add("hidden"); } else { glossaryHeader.classList.remove("hidden"); glossaryStickyHeader.classList.add("hidden"); glossarySearch.classList.remove("hidden"); } } /** HIGHLIGHT ALPHABET NAVIGATION LINKS WHILE SCROLLING */ // cache the navigation list-items containing links var navigationLinks = osShadowElement.querySelectorAll('#glossary-header-sticky > .glossary-header-alphabets > ul > li'); // cache the alphabet sections var sections = osShadowElement.querySelectorAll('.oc-glossary-item > div > span.item-head'); // map each target section ID to the corresponding navigation list-items var sectionIdToNavigationLink = {}; for (var i = 0; i < sections.length; i++) { var id = sections[i].id; sectionIdToNavigationLink[id] = osShadowElement.querySelectorAll('#glossary-header-sticky > .glossary-header-alphabets > ul > li.alpha-' + id); } function getOffset(el) { var _x = 0; var _y = 0; while (el && !isNaN(el.offsetLeft) && !isNaN(el.offsetTop)) { _x += el.offsetLeft - el.scrollLeft; _y += el.offsetTop - el.scrollTop; el = el.offsetParent; } return { top: _y, left: _x }; } function highlightNavigation() { // get the current vertical position of the scroll bar var scrollPosition = window.pageYOffset || document.documentElement.scrollTop; // iterate the sections for (var i = sections.length - 1; i >= 0; i--) { var currentSection = sections[i]; // get the position of the section var sectionTop = getOffset(currentSection).top; // if the user has scrolled over the top of the section if (scrollPosition >= sectionTop - 250) { // get the section id var id = currentSection.id; // get the corresponding navigation link var navigationLink = sectionIdToNavigationLink[id]; // if the link is not active if (typeof navigationLink[0] !== 'undefined') { if (!navigationLink[0].classList.contains('active')) { // remove .active class from all the links for (i = 0; i < navigationLinks.length; i++) { navigationLinks[i].className = navigationLinks[i].className.replace(/ active/, ''); } // add .active class to the current link navigationLink[0].className += (' active'); } } else { // remove .active class from all the links for (i = 0; i < navigationLinks.length; i++) { navigationLinks[i].className = navigationLinks[i].className.replace(/ active/, ''); } } // we have found our section, so we return false to exit the each loop return false; } } } if (glossaryHeader) { window.addEventListener('scroll', highlightNavigation); } /** Glossary page ends here**/ /** NL frontpage modification - version 2.0 **/ // Get the HTML element you need. const imageOverlay = osShadowElement.getElementById('testimonial-video-section-block-image-overlay'); const playButton = osShadowElement.getElementById('testimonial-video-section-block-play'); if (playButton) { var vidId = playButton.getAttribute("data"); // Add the event listener for the play button. playButton.addEventListener('click', play) } // The function that is called when the button is clicked. function play(e) { e.preventDefault(); let iframe_tag = osShadowElement.getElementById('ytplayer'); iframe_tag.setAttribute('src', 'https://www.youtube.com/embed/' + vidId + '?autoplay=1&enablejsapi=1&origin=http%3A%2F%2Flocalhost&widgetid=1'); imageOverlay.style.opacity = '0'; playButton.style.opacity = '0'; window.setTimeout(function () { playButton.style.display = 'none'; imageOverlay.style.display = 'none'; }, 800); // timed to match animation-duration } // Glossary page navigationbar issue fix Start let elemWebTopMenu = document.querySelector(".WebTop-Nav"); let elemWebTopSearch = document.querySelector(".MegaMenuAndSearchWrapper"); let elem = document.querySelector("#glossary-header-sticky"); if (elem && ( elemWebTopMenu || elemWebTopSearch ) ) { let rect = elem.getBoundingClientRect(); let elemTop = rect.top; let elemBottom = rect.bottom; let rectWebTop = elemWebTopMenu.getBoundingClientRect(); let elemTopWebTop = rectWebTop.top; let elemBottomWebTop = rectWebTop.bottom; let rectWebTopSearch = elemWebTopSearch.getBoundingClientRect(); let elemTopWebTopSearch = rectWebTopSearch.top; let elemBottomWebTopSearch = rectWebTopSearch.bottom; if ( ( elemBottomWebTopSearch >= elemTop ) || ( elemBottomWebTop >= elemTop ) ) { elem.style.zIndex = 200; } else { elem.style.zIndex = 0; } document.addEventListener('scroll', function() { let rect = elem.getBoundingClientRect(); let elemTop = rect.top; let elemBottom = rect.bottom; let rectWebTop = elemWebTopMenu.getBoundingClientRect(); let elemTopWebTop = rectWebTop.top; let elemBottomWebTop = rectWebTop.bottom; let rectWebTopSearch = elemWebTopSearch.getBoundingClientRect(); let elemTopWebTopSearch = rectWebTopSearch.top; let elemBottomWebTopSearch = rectWebTopSearch.bottom; if ( ( elemBottomWebTopSearch >= elemTop ) || ( elemBottomWebTop >= elemTop ) ) { elem.style.zIndex = 200; } else { elem.style.zIndex = 0; } }); } let glossaryNav = document.querySelector("#glossary-header-sticky"); let topSearchBarGloss = document.querySelector(".MegaMenuAndSearchWrapper"); let navSpacer = document.querySelector(".NavSpacer"); if ( glossaryNav && topSearchBarGloss) { topSearchBarGloss.style.position = 'static'; navSpacer.style.display = 'none'; } // Glossary page navigationbar issue fix End /******* Custom YouTube video embed js start *******/ let yt_thumb_wraps = document.querySelectorAll('.yt-video-wrapper.yt-play-icon'); if (yt_thumb_wraps) { yt_thumb_wraps.forEach(yt_thumb_wrap => { yt_thumb_wrap.addEventListener("click", function(event) { event.preventDefault(); let vid = event.target.dataset.vid; let yt_thumb = event.target; let vtitle = yt_thumb.getAttribute("title"); if(!vid){ yt_thumb = yt_thumb.querySelector('.yt-thumb-image'); vid = yt_thumb.dataset.vid; vtitle = yt_thumb.getAttribute("title"); } if(vid && yt_thumb){ let ytvideo = ''; let yt_thumb_wrap = yt_thumb.closest('.yt-video-wrapper.yt-play-icon'); yt_thumb_wrap.innerHTML = ytvideo; yt_thumb_wrap.classList.remove("yt-play-icon"); } }); }); } /******* Custom YouTube video embed js end *******/