• Skip to main content

Victor Font Consulting Group, LLC

Digital Business Strategists

Call Us:

+1 919-604-5828

  • Home
  • Care Plans
    • Care Articles
    • Optional Subscriptions
  • Consultations
  • Products
    • Code Snippets
    • Public GitHub Repositories
    • Gist Snippets
    • Pastebin Snippets (Free)
    • Free Plugins
  • FAQs
  • Support
    • Graphic Design
  • Our Team
    • Contact
    • Speakers
    • Portfolio
  • Resources
    • Free WordPress Video Training
    • Tutorials
    • Articles
    • Cybersecurity
    • EU Referral Network
You are here: Home / Code Snippet / Add WebSite Markup to Genesis <head>

Add WebSite Markup to Genesis <head>

By Victor M. Font Jr.
February 14, 20162 Comments

Here's a quick answer to the question:

How do I add itemscope="http://schema.org/WebSite" to the <head> element in a Genesis Framework powered theme?

Add the following to your theme's functions.php:

The Technical Explanation

If you are more technically inclined and want to understand why this code works, here's the break down. The <head> element in a Genesis Framework powered theme is generated from the framework's /lib/structure/header.php file. The following code contains lines 14 through 68 of that code:

For HTML5 based themes, the Genesis framework adds a neat little function named genesis_attr() to the head element's output. The genesis_attr() function allows a developer to build a list of attributes into a string and apply a contextual filter to that string. The function takes two parameters, $context and $attributes. You can see the context in the highlighted line above ('head'). The filter used in the code is created by appending the context to the function name. In this case, the contextual filter is genesis_attr_head. The $attributes are passed through the filter as an array.

  • 8shares
  • Facebook0
  • Twitter0
  • Pinterest0
  • LinkedIn8
  • Print
  • SMS0

About Victor M. Font Jr.

Victor M. Font Jr. is an award winning author, entrepreneur, and Senior IT Executive. A Founding Board Member of the North Carolina Executive Roundtable, he has served on the Board of Advisors, of the North Carolina Technology Association, the International Institute of Business Analysis, Association of Information Technology Professionals, Toastmasters International, and the North Carolina Commission for Mental Health, Developmental Disabilities, and Substance Abuse Services. He is author of several books including The Ultimate Guide to the SDLC and Winning With WordPress Basics, and Cybersecurity.

Reader Interactions

VictorFont.com runs on the Genesis Framework

Genesis FrameworkThe Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Check out the incredible features and the selection of designs. It's that simple—start using Genesis now!

Click here to download The Genesis Guide for Absolute Beginners (PDF - 1.4 MB)

Leave a Reply Cancel reply

Your email address and website will not be published. Required fields are marked *
Posting a comment means that you agree with and accept our Comment & Product Review Policy

Comments

  1. Luca Spinelli

    August 24, 2017 at 7:22 am

    What i’m looking for to edit my theme. Thanks Victor and Genesis team 🙂

    Reply
    • Victor M. Font Jr.

      August 24, 2017 at 8:27 am

      Hi Luca,

      As an FYI, please don’t confuse the help I provide as a community volunteer with being part of the Genesis team. We are independent contractors and have no affiliation with Studio Press or the Genesis team. Other than the help we provide on the Studio Press forum and WordPress Genesis Facebook page, we expect to receive compensation for our services as paid professionals. If you have a budget and would like to discuss your project requirements, please start by filling out our Project Inquiry form.

      Reply

Call: +1 919-604-5828

Send us an E-mail

Accessibility Statement | Affiliate Marketing Disclosure | Capability Statement

Cookie Policy | Comment & Product Review Policy | Privacy Policy | Site Map | Terms & Conditions

Copyright © 2003–2021 Victor M. Font Jr.

Return to top of page
Cover image: 5 Things You Can Fix On Your Website In The Next Week To Increase Engagement

Attract New Customers Automatically for Free!

  • Learn how to use the Internet to attract REAL clients
  • Avoid the 3 big mistakes EVERYBODY makes
  • Put this system on AUTOPILOT with the tools the Pros use!

GET YOUR COPY!

This little ebook has helped hundreds of business professionals get real results.
Now it's your turn!

ebook lead capture
Privacy Policy
{"cookieName":"wBounce","isAggressive":false,"isSitewide":true,"hesitation":"","openAnimation":false,"exitAnimation":false,"timer":"","sensitivity":"","cookieExpire":"7","cookieDomain":"","autoFire":"","isAnalyticsEnabled":false}