Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged wordpress



Put it in functions.php
0 102 posted 5 years ago by burnandbass
https://www.chrisjmendez.com/2014/09/19/wordpress-disable-html-in-wordpress-comments/
0 91 posted 5 years ago by chrisaiv
https://www.chrisjmendez.com/2014/09/19/wordpress-replace-a-themes-google-font-with-your-own/
0 87 posted 5 years ago by chrisaiv
enter the full name you want displayed alongside the email address
0 78 posted 5 years ago by chrisaiv
The functions here are a compendium of snippets I've posted in the past. I will continue to update this file regularly.
1 90 posted 5 years ago by chrisaiv
Remove all those boxes on the Wordpress Dashboard
0 67 posted 5 years ago by chrisaiv
Gravity Forms by default will write an inline JavaScript call to jQuery on every form you add to a page.
0 69 posted 5 years ago by chrisaiv
Prevents wordpress back-end from stripping formatting
0 45 posted 5 years ago by chrisaiv
Over the years, wordpress has placed a lot of junk in their system.
0 63 posted 5 years ago by chrisaiv
Disallow HTML in WordPress comments, add this snippet to your functions.php file.
0 79 posted 5 years ago by chrisaiv
You might also consider just installing this Wordpress plug-in. It's way easier https://wordpress.org/plugins/google-typography/
0 70 posted 5 years ago by chrisaiv
Add Login / Logout to your WordPress Menu. You must have UserPro
0 70 posted 5 years ago by chrisaiv
If you make a lot of edits, eventually the revisions will start to bother you or bog down your database. Heres how you can put a cap on the number of recorded revisions.
0 68 posted 5 years ago by chrisaiv
To encourage subscribers to visit your website, rather than letting them just consume content through your RSS feed, you might want to display only the excerpt and featured image of posts.
0 67 posted 5 years ago by chrisaiv
If you want statistics about your subscribers, you’ll have to use FeedBurner instead of Wordpress' out-of-the-box feed.
0 84 posted 5 years ago by chrisaiv
If you user logs in and they're on a mobile phone, they might get that annoying black bar on top. This script removes that if they can edit posts or on mobile.
0 69 posted 5 years ago by chrisaiv
Checks if a particular user has a role.
0 72 posted 5 years ago by chrisaiv
It's probably not a good idea to always use this trick but if you need to, you'll be glad you bookmarked this script.
0 62 posted 5 years ago by chrisaiv
Insert a favicon using functions.php
0 40 posted 5 years ago by chrisaiv
One thing that can go wrong in WordPress magazine themes is when users include too many words before the more tag.
0 64 posted 5 years ago by chrisaiv
Add the code below to change the Home & Site URL that is configured in the database (wp-options table) by WordPress. Whenever you copy/move a site to a new hosting and the URL has changed you can use the code below to fix any strange redirects that m...
0 62 posted 5 years ago by 108Bits
Simply paste the following snippet of code into your theme’s functions.php file and adjust the CSS on line 4 as needed.
0 94 posted 5 years ago by chrisaiv
Thanks to Tom McFarlin for this. http://tommcfarlin.com/wordpress-post-exists-by-id/#more-30264
1 238 posted 5 years ago by adambundy
Remove Wordpress empty paragraphs form the_content() function.
0 117 posted 5 years ago by razvanstavila
Add custom header style for Admin
0 70 posted 5 years ago by razvanstavila
Add a css file to style the visual editor to resemble the theme style.
1 84 posted 5 years ago by razvanstavila
Add page name slug to Wordpress body class array.
0 73 posted 5 years ago by razvanstavila
Add Google Lato Font link from Google Fonts to your website. It will add to your admin area also.
0 75 posted 5 years ago by razvanstavila
Generate The Tiny URL to add to any post
0 47 posted 5 years ago by daprela
FME has designed efficient Canvas Drawing Plugin for WordPress that enables users to draw canvas online on separate paint book by utilizing basic drawing tools like brush, pencil, etc. This WordPress Plugin will create two additional pages on your we...
0 68 posted 5 years ago by alastarmason1