The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join

Functions


Add Custom Body Class

Add your own CSS class to every page. Steps Done — a custom class will be added to the <body> tag.



Hide WordPress Help Tab

Removes the Help tab from the top-right corner of the admin area. Steps Open functions.php. Add the code below. Save the file. Done — the Help tab will be hidden.


Disable WordPress Admin Color Scheme Picker

Prevent users from changing admin color schemes. Steps Open functions.php. Add the code below. Save the file. Done — color scheme options will disappear from profiles.


Add a Custom Roles with permissions

To add a new user role in WordPress, you use the add_role() function. You can place this snippet in your active theme’s functions.php file or within a custom plugin. Here is the standard snippet to create a custom role (in this example, a “Manager”)



Show Word Count for Posts

Display the total number of words in a post. Steps Add the code below to functions.php. Save the file. Call the function inside your theme. Done — readers can see the article word count.


Disable Image Dragging

Helpful for portfolio, photography, and artwork websites. Steps Done — images cannot be dragged by visitors.


Automatically Add a “Copy Link” Button to Posts

Allow visitors to copy the current post URL with one click. Steps Open your WordPress theme functions.php file. Add the code below at the end of the file. Save the file. View any post and click the button. Done — visitors can instantly copy the post URL.


Proudly supported by