Skip to content

haseeb-aftab/wordpress-custom-snippets

 
 

Repository files navigation

WordPress Custom Snippets

This repository contains a collection of useful custom snippets for WordPress websites. These snippets are designed to add functionality or modify existing features in WordPress.

How to Use

  1. Choose the snippet you want to use.
  2. Copy the code from the respective file.
  3. Paste the code into your theme's functions.php file or in a site-specific plugin.

Note: It's recommended to use a child theme or a site-specific plugin to add custom code to your WordPress site. This ensures that your modifications won't be lost when updating your theme.

Snippets Included

  1. custom-login-logo.php: Replace the default WordPress login page logo with your own.
  2. disable-xmlrpc.php: Disable XML-RPC functionality for improved security.
  3. add-custom-dashboard-widget.php: Add a custom widget to the WordPress dashboard.
  4. modify-excerpt-length.php: Change the default excerpt length for posts.
  5. add-custom-image-size.php: Add a new custom image size for your theme.

Contributing

Feel free to submit pull requests with your own custom snippets. Please ensure that your code is well-commented and follows WordPress coding standards.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Repository for WordPress Snippets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%