Filtering the Gallery Image Output in WordPress – Adding Class or Data Attribute


To manipulate the linked images, specifically the links themselves in the WordPress Gallery output for doing things like adding in a CSS class or a data attribute value you can use the post_gallery filter in /wp-includes/media.php which is the right tool for the job. The filter can be applied like so… So this is an exact copy of the original…

Read More

Adding Classes and Attributes to HTML elements in Genesis

Attributes can be added into various HTML markup elements via filters in the Genesis Framework, these attributes can be adding in an ID or additional CSS Class, or amending the Microdata Schema including role, itemscope or itemtype attributes. The HTML markup elements/sections also known as ‘contexts‘ are originally declared as functions in the core Genesis Framework in:…

Read More