An open API service indexing awesome lists of open source software.

https://github.com/mrgkanev/awesome-wordpress-functions

Welcome to the Awesome WordPress Functions repository! This project is dedicated to providing a comprehensive collection of useful WordPress functions to help you optimize and customize your WordPress site. Whether you’re looking to tweak the admin panel, improve performance, or enhance WooCommerce, you’ll find practical solutions here.
https://github.com/mrgkanev/awesome-wordpress-functions

List: awesome-wordpress-functions

funcions php snippets woocommerce wordpress wp

Last synced: 4 months ago
JSON representation

Welcome to the Awesome WordPress Functions repository! This project is dedicated to providing a comprehensive collection of useful WordPress functions to help you optimize and customize your WordPress site. Whether you’re looking to tweak the admin panel, improve performance, or enhance WooCommerce, you’ll find practical solutions here.

Awesome Lists containing this project

README

          

# Awesome WordPress Functions

This is a list of useful WordPress functions that I often reference to enhance or clean up my sites. Please be careful and make backups.

You can use a plugin or add it into your "functions.php" file. Here are plugins that I recommend:

- [Fluent Snippets](https://wordpress.org/plugins/easy-code-manager/) - Newer but faster.
- [Code Snippets](https://wordpress.org/plugins/code-snippets/) - Slower but popular.

## 1. [General WordPress Setup](general-wordpress-setup.md)

- [Hide WordPress Update Nag to All But Admins](general-wordpress-setup.md/#hide-wordpress-update-nag-to-all-but-admins)
- [Utilize Proper WordPress Titles](general-wordpress-setup.md/#utilize-proper-wordpress-titles)
- [Create Custom WordPress Dashboard Widget](general-wordpress-setup.md/#create-custom-wordpress-dashboard-widget)
- [Remove All Dashboard Widgets](general-wordpress-setup.md/#remove-all-dashboard-widgets)
- [Include Navigation Menus](general-wordpress-setup.md/#include-navigation-menus)
- [Insert Custom Login Logo](general-wordpress-setup.md/#insert-custom-login-logo)
- [Modify Admin Footer Text](general-wordpress-setup.md/#modify-admin-footer-text)
- [Enqueue Styles and Scripts](general-wordpress-setup.md/#enqueue-styles-and-scripts)
- [Enqueue Google Fonts](general-wordpress-setup.md/#enqueue-google-fonts)

## 2. [Content Modification](content-modification.md)

- [Modify Excerpt Length](content-modification.md/#modify-excerpt-length)
- [Change Read More Link](content-modification.md/#change-read-more-link)
- [Change More Excerpt](content-modification.md/#change-more-excerpt)
- [Disable Emojis Mess](content-modification.md/#disable-emojis-mess)
- [Remove Comments](content-modification.md/#remove-comments)
- [Limit Post Revisions](content-modification.md/#limit-post-revisions)
- [Change Media Gallery URL](content-modification.md/#change-media-gallery-url)
- [Create Custom Thumbnail Size](content-modification.md/#create-custom-thumbnail-size)
- [Add Categories for Attachments](content-modification.md/#add-categories-for-attachments)
- [Add Tags for Attachments](content-modification.md/#add-tags-for-attachments)
- [Add Custom Excerpt to Pages](content-modification.md/#add-custom-excerpt-to-pages)

## 3. [Global Settings & Customizations](global-settings-customizations.md)

- [Create a Global String](global-settings-customizations.md/#create-a-global-string)
- [Support Featured Images](global-settings-customizations.md/#support-featured-images)
- [Support Search Form](global-settings-customizations.md/#support-search-form)
- [Excluding pages from search](global-settings-customizations.md/#excluding-pages-from-search)
- [Disable XMLRPC](global-settings-customizations.md/#disable-xmlrpcphp)
- [Escape HTML in Posts](global-settings-customizations.md/#escape-html-in-posts)
- [Create Custom Global Settings](global-settings-customizations.md/#global-settings-customizations.mdcreate-custom-global-settings)
- [Remove WordPress Admin Bar](global-settings-customizations.md/#remove-wordpress-admin-bar)
- [Add Open Graph Meta Tags](global-settings-customizations.md/#add-open-graph-meta-tags)
- [Disable the WordPress Version information in the head section](global-settings-customizations.md/#disable-the-wordpress-version-information-in-the-head-section)

## 4. [Customizations & Tweaks](customizations-tweaks.md)

- [Add Custom Post Type](customizations-tweaks.md/#add-custom-post-type)
- [Exclude a Category From WordPress Loops](customizations-tweaks.md/#exclude-a-category-from-wordpress-loops)
- [Implement Preconnect to Google Fonts in Themes](customizations-tweaks.md/#implement-preconnect-to-google-fonts-in-themes)
- [Add Thumbnail Column to Post Listing](customizations-tweaks.md/#add-thumbnail-column-to-post-listing)
- [Add Lead Class to First Paragraph](customizations-tweaks.md/#add-lead-class-to-first-paragraph)
- [Exclude Custom Post Type from Search](customizations-tweaks.md/#exclude-custom-post-type-from-search)
- [Remove Query String from Static Resources](customizations-tweaks.md/#remove-query-string-from-static-resources)
- [Disable Website Field From Comment Form](customizations-tweaks.md/#disable-website-field-from-comment-form)
- [Modify jQuery](customizations-tweaks.md/#modify-jquery)
- [Disable JSON Rest API](customizations-tweaks.md/#customizations-tweaks.mddisable-json-rest-api)

## 5. [Admin Menu & User Role Management](admin-user-role.md)

- [Remove Admin Menu Items Depending on User Role](admin-user-role.md/#remove-admin-menu-items-depending-on-user-role)
- [Remove Admin Menu Items Depending on Email Address (Domain)](admin-user-role.md/#remove-admin-menu-items-depending-on-email-address-domain)
- [Reorder Admin Menu Items](admin-user-role.md/#reorder-admin-menu-items)

## 6. [PHP & Scripting](php-scripting.md)

- [PHP Logger](php-scripting.md/#php-logger)
- [Always Show Second Bar in TinyMCE](php-scripting.md/#always-show-second-bar-in-tinymce)
- [Switch Post Type](php-scripting.md/#switch-post-type)

## 7. [WP Config](wp-config.md)

- [Change Table Prefixes](wp-config.md/#change-table-prefixes)
- [Enable the Wordpress Debugger](wp-config.md/#enable-the-wordpress-debugger)
- [Disable the theme and plugin editor](wp-config.md/#disable-the-theme-and-plugin-editor)
- [Moving wp-content Directory](wp-config.md/#moving-wp-content-directory)
- [Limiting HTTPS requests](wp-config.md/#limiting-https-requests)

## 8. [Performance Optimization](performance-optimization.md)

- [Load heavy 3rd-party scripts later for better performance](performance-optimization.md/#load-heavy-3rd-party-scripts-later-for-better-performance)
- [Set custom favicon on admin pages](performance-optimization.md/#set-custom-favicon-on-admin-pages)
- [Disable the message - JQMIGRATE: Migrate is installed, version 1.4.1](performance-optimization.md/#disable-the-message---jqmigrate-migrate-is-installed-version-141)
- [Empty Trash Automatically](performance-optimization.md/#empty-trash-automatically)

## 9. [WooCommerce modifications](woocommerce-modifications.md)

- [Deactivate some WooCommerce Checkout Fields](woocommerce-modifications.md/#deactivate-some-woocommerce-checkout-fields)
- [Restricting Access to Pages Based on WooCommerce Purchases](woocommerce-modifications.md/#restricting-access-to-pages-based-on-woocommerce-purchases)
- [Rounding prices to .99](woocommerce-modifications.md/#rounding-prices-to-99)