Playgrounds
Snippets
Developers
Compiler
All
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
Coffee
CoffeeScript
ColdFusion
Command
CSS
Delphi
Django
ES6
GLSL
Grunt
Gulp
HAML
Haskell
HTML
iOS
Jade
Java
JavaScript
jQuery
JSX
Less
LUA
MDX
MySQL
Objective
Other
Pascal
Perl
PHP
Plain text
PowerShell
Processing
Progress
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
SCSS
SmallBASIC
Smarty
SQL
Stylus
SVG
Swift
TypeScript
VHDL
X++
XHTML
XML
Xojo
XSLT
New snippet
New playground
Sign up
Login
Upload
Playgrounds
Snippets
Developers
Sign up
Login
Codepad is a place for developers to share code snippets (PHP, Java, Bash, C, C++, Python and more). Create your HTML, CSS and JS Demos.
Sign up
Learn more
Sort
Popular
Most liked
Most recent
Time
Today
Last week
Last month
Last year
All time
Select Languages
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
ColdFusion
Command
CSS
Delphi
Django
Grunt
Gulp
HAML
HTML
iOS
Jade
Java
JavaScript
jQuery
Less
MySQL
Objective
Other
Pascal
Perl
PHP
PowerShell
Processing
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
Smarty
SQL
Swift
VHDL
XHTML
XML
Xojo
XSLT
SCSS
CoffeeScript
GLSL
Progress
Stylus
ES6
Coffee
TypeScript
X++
Haskell
SmallBASIC
JSX
SVG
Plain text
LUA
MDX
Apply
Reset
popular • PHP
Wordpress - Set globals for max image width for posts
PHP
0
3
1197
Get File Extension
PHP
0
2
1808
Get File Size in reader-friendly units (KB, MB, etc.)
PHP
0
4
1785
Get the filename of the newest file in a directory
PHP
0
0
1857
Number of days between two dates
PHP
3
8
2126
WordPress: disable dragging of metaboxes in admin panel
PHP
0
0
1387
WordPress: disable browser update warning in admin
PHP
0
0
1498
xml-xsl-transform.php
PHP
0
2
1580
Save Database with date
PHP
0
0
1596
Featured image of page parent
PHP
0
1
1414
Wordpress Post Thumbnail
PHP
0
1
1846
If page is
PHP
0
0
1507
Custom Wordpress Sidebar
PHP
0
0
1330
Location IP
PHP
0
0
1717
Displays child pages of page with ID number
PHP
0
0
1266
Display Wordpress Parent ID
PHP
0
0
1261
If Page is Child of Page ID then do something
PHP
0
3
1411
add default post thumbnail in wordpress loop
PHP
0
0
1500
post title outside of the wordpress loop
PHP
0
2
1219
Remove WooCommerce default sidebar
PHP
1
3
4928