As a WordPress developer, I continually use code to customize the client websites I’m working on. Over the years, I gathered and indexed a great number of helpful snippets that I frequently tweak and use in those web projects.
Today, I’m pleased to be able to share my entire code snippets collection with you. Thus far, I maintain a growing collection of 67 useful code snippets, exclusively WordPress and Genesis related.
They are free to use, so go ahead and build something awesome with them!
Notification
If you want to be notified of new code snippets being shared, simply add this URL to your favorite RSS reader app. Since all the code is embedded from GitHub, the RSS feed only shows post titles in most RSS readers (I know, this is annoying).
If you prefer, you can follow me on Twitter. Tweets related to new code snippets being published on this site will be prefixed with the mention [Code].
Disclaimer
All code snippets shared on jeanphilippemarchand.com are intended for intermediate web developers and designers who know how to use and tweak them. Please keep in mind that I do NOT provide support for implementing code in your theme, nor can I be held responsible if your website is broken after trying to embed a snippet.
Find a Code Snippet
Each code snippet I share includes one or several tags (see list below) so that it’s easier to find it afterwards. For now, I guess the most simple way to find a snippet is to use your web browser’s find bar (hit Command-F on your Mac or Control-F on your PC) in order to locate a specific word or phrase on this very page.
In the future, I would like to be able to implement another way to find a code snippet (create a dynamic search form for instance), no ETA though. Don’t hesitate to tell me if you have any suggestion on how to do that.
Most Recent Code Snippets Shared
- Link Post Dates to Their Archive Pages in WordPress
- Delay Posts From Appearing Immediately in WordPress RSS Feed
- Remove Default Post Type From WordPress Dashboard Screen
- Remove Specific Admin Menu Items From Users in WordPress
- Change JPEG Compression Level of Image Files Uploaded to WordPress
- Unregister Navigation Menus in Genesis
- Auto-Populate Post Title Field with Post ID in WordPress
- Prepend Custom Text to Post Titles in WordPress
- Add Custom Class to HTML Elements in Genesis
- Disable Theme and Plugin Editors from WordPress Admin Panel
WordPress-Related Code Snippets
- Add a Custom Text Message to WordPress Login Page
- Add a Login/Logout Toggle Item in WordPress Navigation Menu
- Add Colored Content Boxes to Any WordPress Theme
- Add Custom Content in WordPress RSS Feed
- Add New Image Sizes in WordPress
- Add Social Share Links in WordPress RSS Feed
- Add Support for WordPress Post Formats
- Auto-Populate Post Title Field with Post ID in WordPress
- Change Excerpt Length of WordPress Posts
- Change JPEG Compression Level of Image Files Uploaded to WordPress
- Customize Jetpack Infinite Scroll Module ‘Older Posts’ Text
- Customize Private Posts Prefix in WordPress
- Customize Protected Posts Prefix in WordPress
- Deactivate WordPress Heartbeat API
- Delay Posts From Appearing Immediately in WordPress RSS Feed
- Disable Password Reset Option in WordPress
- Disable RSS Feeds in WordPress
- Disable Theme and Plugin Editors from WordPress Admin Panel
- Disable Visual and HTML Editor in WordPress
- Disable WordPress Admin Bar for All Users Except for Administrators
- Display a Search Form Using a Shortcode in WordPress
- Display the Total Number of Posts Using a Shortcode in WordPress
- Enable Keyboard Navigation for Single Posts in WordPress
- Enable the Use of Shortcodes in WordPress Text Widgets
- Exclude Posts of Specific Categories From Blog Homepage
- Exclude Posts of Specific Categories From RSS Feed
- Install Font Awesome Icons Using MaxCDN
- Install Ionicons Icon Fonts Using MaxCDN
- Link Post Dates to Their Archive Pages in WordPress
- Make Private Posts Visible to Subscribers in WordPress
- Prepend Custom Text to Post Titles in WordPress
- Remove “Protected:” From Titles of Password Protected Posts and Pages
- Remove a CSS Class From a Page Template in WordPress
- Remove Default Post Type From WordPress Dashboard Screen
- Remove Default Widgets From the WordPress Backend
- Remove Image Sizes in WordPress
- Remove Specific Admin Menu Items From Users in WordPress
- Remove the Word “Private:” From Private Post Titles in WordPress
- Remove Website URL Field From WordPress Comment Form
- Set Opacity to the Background Color of an Element
- Set WordPress Posts Visibility to Private by Default
- Show a Different Navigation Menu to Logged-In Users in WordPress
Genesis-Related Code Snippets
- Add a Sticky Menu to the Genesis Sample Child Theme
- Add a Sticky Message to Any Genesis Child Theme
- Add a Tertiary or Footer Menu to Any Genesis Child Theme
- Add Custom Class to HTML Elements in Genesis
- Add Line Breaks to Genesis Site Description
- Add Previous and Next Navigation Links to Single Posts in Genesis
- Change Widget Titles HTML Markup in Genesis Framework
- Customize Genesis Author Box Title
- Customize Genesis Search Form Input Box
- Display Featured Image above Single Post Title in Genesis
- Enable Genesis Author Box on Archive Pages
- Enable Genesis Author Box on Single Posts
- Fade an Element in/out When Scrolling in Genesis
- Force Navigation Menu to One Level Depth in Genesis
- Make Genesis Sample Child Theme Menus Responsive
- Make Genesis Search Form Input Box Text Disappear on Focus
- Register and Display a New Custom Widget Area in Genesis
- Remove Genesis “Header Right” Widget Area
- Remove Genesis Author Box on Single Posts
- Remove Site Description in Genesis
- Swap Post Title and Image Position on Archive Page in Genesis
- Unregister Genesis Default Widgets
- Unregister Genesis Layouts
- Unregister Genesis Primary and Secondary Sidebars
- Unregister Navigation Menus in Genesis
Shortcode-Related Code Snippets
- Display a Search Form Using a Shortcode in WordPress
- Display the Total Number of Posts Using a Shortcode in WordPress
- Enable the Use of Shortcodes in WordPress Text Widgets
- Link Post Dates to Their Archive Pages in WordPress
Widget-Related Code Snippets
- Change Widget Titles HTML Markup in Genesis Framework
- Enable the Use of Shortcodes in WordPress Text Widgets
- Register and Display a New Custom Widget Area in Genesis
- Remove Default Widgets From the WordPress Backend
- Remove Genesis “Header Right” Widget Area
- Unregister Genesis Default Widgets
Image-Related Code Snippets
- Add New Image Sizes in WordPress
- Change JPEG Compression Level of Image Files Uploaded to WordPress
- Display Featured Image above Single Post Title in Genesis
- Remove Image Sizes in WordPress
- Swap Post Title and Image Position on Archive Page in Genesis
Navigation-Related Code Snippets
- Add a Login/Logout Toggle Item in WordPress Navigation Menu
- Add a Sticky Menu to the Genesis Sample Child Theme
- Add a Tertiary or Footer Menu to Any Genesis Child Theme
- Add Previous and Next Navigation Links to Single Posts in Genesis
- Enable Keyboard Navigation for Single Posts in WordPress
- Force Navigation Menu to One Level Depth in Genesis
- Make Genesis Sample Child Theme Menus Responsive
- Show a Different Navigation Menu to Logged-In Users in WordPress
- Unregister Navigation Menus in Genesis
Search-Related Code Snippets
- Customize Genesis Search Form Input Box
- Display a Search Form Using a Shortcode in WordPress
- Make Genesis Search Form Input Box Text Disappear on Focus
RSS-Related Code Snippets
- Add Custom Content in WordPress RSS Feed
- Add Social Share Links in WordPress RSS Feed
- Delay Posts From Appearing Immediately in WordPress RSS Feed
- Disable RSS Feeds in WordPress
- Exclude Posts of Specific Categories From RSS Feed
Post-Related Code Snippets
- Customize Private Posts Prefix in WordPress
- Make Private Posts Visible to Subscribers in WordPress
- Remove “Protected:” From Titles of Password Protected Posts and Pages
- Remove the Word “Private:” From Private Post Titles in WordPress
- Set WordPress Posts Visibility to Private by Default