.seo-faq-item { border-bottom: 1px solid #e2e8f0; }
.seo-faq-item:last-child { border-bottom: none; }
.seo-faq-question { width: 100%; text-align: left; padding: 18px 24px; background: #f8fafc; border: none; outline: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s ease; }
.seo-faq-question:hover { background: #f1f5f9; }
.seo-faq-question-text { font-size: 16px; font-weight: 600; color: #1e293b; margin: 0; }
.seo-faq-icon { font-size: 20px; color: #64748b; transition: transform 0.3s ease; }
.seo-faq-answer { display: none; padding: 0 24px 18px; color: #475569; font-size: 15px; line-height: 1.6; background: #f8fafc; }
.seo-faq-item.active .seo-faq-answer { display: block; }
.seo-faq-item.active .seo-faq-icon { transform: rotate(45deg); }
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "How does SEO benefit my WordPress website?",
"acceptedAnswer": {
"@type": "Answer",
"text": "SEO increases your visibility in search engine results, driving organic traffic to your site."
}
}, {
"@type": "Question",
"name": "Is this FAQ block schema-optimized?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes, this block includes JSON-LD FAQPage Schema to help with Google Rich Snippets."
}
}, {
"@type": "Question",
"name": "Can I customize the styles of this layout?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes, the code uses standard HTML and CSS accessible within WordPress."
}
}]
}
function toggleSeoFaq(button) {
var parent = button.parentElement;
var isActive = parent.classList.contains('active');
var allItems = document.querySelectorAll('.seo-faq-item');
for (var i = 0; i < allItems.length; i++) {
allItems[i].classList.remove('active');
}
if (!isActive) {
parent.classList.add('active');
}
}
SEO increases your visibility in search engine results, driving organic traffic to your site. By optimizing your WordPress content, site structure, and technical performance, you can reach more potential customers without paying for every click.
Yes, this block includes JSON-LD FAQPage Schema. This helps Google understand your content better and can lead to "Rich Snippets" in search results, potentially increasing your click-through rate significantly.
Absolutely. The code uses block-level HTML and inline CSS classes that are easily accessible within the WordPress HTML block editor for color, font, and spacing adjustments.