• Skip to main content
  • Skip to primary sidebar

Victor Font Consulting Group, LLC

The DEX Intranet Specialists

  • 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
  • Contact
    • Speakers
    • Portfolio
  • Resources
    • Free WordPress Video Training
    • Tutorials
    • Articles
    • Cybersecurity
    • EU Referral Network

Add WebSite Markup to Genesis <head>

February 14, 2016 By Victor M. Font Jr.

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

Filed Under: Code Snippet, Genesis, Programming, WordPress Tagged With: Code Snippet, Genesis, Programming, WordPress

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.

Primary Sidebar

Shopping Cart

Books

  • Ultimate Guide to the SDLC front cover The Ultimate Guide to the SDLC
    Rated 5.00 out of 5
    $74.95
  • Winning With WordPress Basics 2nd Edition Winning With WordPress Basics 2nd Edition $19.95

Recent Articles

  • Modern Scam Defense: How Consumers and Businesses Can Recognize and Stop Email, Phone, and Text Fraud
  • How to Write a PRD So Dense It’s Technically a Novel
  • Top 5 Plugin Names That Scare Our Legal Department
  • When Agile Meets Our 3-Year Waterfall Roadmap: A Love Story
  • Why Our Enterprise Needs 27 Stakeholders to Approve a Button Color Change

Top 10 Article Categories

Best Practice Code Snippet Computers and Internet Genesis How To Leadership Programming Servant Leadership Tutorial WordPress

 
We only use analytical cookies on our website that allow us to recognize and count the number of visitors, but they do not identify you individually. They help us to improve the way our website works. By clicking Accept you, agree to cookies being used in accordance with our Cookie Policy.