This Repository contains a collection of code snippets for WordPress and its plugins. All snippets are written in PHP (Hypertext Preprocessor). The main goal of those snippets is to add, delete or modify functions from WordPress or one of its plugins.
Navigate through the categories here:
1. Wordpress
2. Woocommerce
3. Elementor
4. Jetpack
- Disable Admin Bar for All Users
- Disable GetLocation on Specific Pages
- Disable Image Links (a Tag)
- Disable WordPress Search
- Add Price to the Add-To-Cart-Button
- Change rel=nofollow to rel=dofollow for Add-To-Cart-Buttons
- Change the Text on the Add-To-Cart-Button
- Disable Ajax Cart Fragments
- Disable the Password Strength Meter
- Add Sold Out Badge to Shop Product Loop
- Define Numbers of Products Displayed per Page
- Hide Add-to-Cart-Button on Shop Product Loop
- Redirect Customers who Purchased the Product to a Specific Page
- Remove Links from the Thumbnail Image on the Single Product Page
- Add the Email-Field on First Place on the Checkout Page
- Auto Check Checkboxes on the Checkout Page
- Delete the Additional Order Information Field on the Checkout Page
- Inline, Remove or Change Fields on the Checkout Page
- Remove the "What is PayPal?" Notice on the Checkout Page
- Add a Shortcode to Display the Product Name
- Add a Shortcode to Display the Product Price
- Add a Shortcode to Display the Product Rating
Add the PHP-Code to your functions.php file in your child-theme or download the plugin Code Snippets and add it in there. Make sure you delete the PHP opening and closing tag if they are already available in the file.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
This repository is a collection of different kind of code snippets for wordpress and its plugins. Some of them are coded by the author himself and some are taken from external sources. The external sources are listed down below.