• 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/Remove Skip Link From Genesis Output

March 8, 2020 By Victor M. Font Jr.

Skip links are internal page links which enable accessibility navigation on a webpage. They are used by screen readers for bypassing or skipping over repetitive web page content.

A recent question on the Genesis Framework Community forum was asked to find out how to remove the primary navigation skip link from the Genesis output.

If you want to examine the Genesis code that creates the skip links, you can find it in the genesis_skip_links() function in the lib/structure/header.php file.

This function's default output is a three element array as shown here using the Kint debugger:

Kint display of Genesis skiplinks before primary navigation removal.

The Genesis developers included a 'genesis_skip_links_output' filter for manipulating this array as needed. To remove an array element using this filter, simply unset it. The result of removing the primary navigation array element is shown in this Kint dump:

Kint display of Genesis skiplinks after primary navigation removal.

Here's the code for removing the skip link array element:

The 'genesis_skip_links_output' filter can also be used to add skip links to your site as well. Add an element to the $links array where the key is the name of the HTML element's ID you're linking to.

  • 1share
  • Facebook1
  • Twitter0
  • Pinterest0
  • LinkedIn0
  • Print
  • SMS0

Filed Under: Accessibility, Code Snippet, Genesis

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

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

Recent Articles

  • Protected: WordPress Database Modernization Blueprint
  • Social Media Management
  • Site Growth Automation
  • GDPR Compliance Monitoring
  • Digital Strategy Accelerator

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.OkNoCookie policy