Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged wordpress



1 ... 8 9 10 11 12 ... 43
Use WP_Query to query a custom taxonomy, using the tax_query parameter.
1 721 posted 12 years ago by f6design
In Wordpress if you are using a custom taxonomy you can get its details (id, slug, etc) using this snippet.
0 690 posted 12 years ago by f6design
Add this snippet to your Wordpress theme's functions.php file to reject any image uploads that are below the specified dimensions.
2 863 posted 12 years ago by f6design
Put the following outside WP
1 657 posted 12 years ago by stephcode
This snippet adds support for post thumbnails (a.k.a. 'featured images') to a Wordpress theme. It also adds an additional image size for image thumbnails, hard cropped. This second step is optional. Add this snippet to your WP theme's functions.ph...
1 770 posted 12 years ago by f6design
Add the following to your Wordpress theme's functions.php file. The jQuery paths/URLs might need to be changed to suite your circumstances.
0 1093 posted 12 years ago by f6design
Simplify the Wordpress admin area for clients by hiding menu items. Add this snippet to your Wordpress theme's functions.php file.
0 820 posted 12 years ago by f6design
If you are creating a custom post type in Wordpress, and turn off the 'editor' capability, then TinyMCE is not loaded. This means any WYSIWYG meta box textareas will fail. Add this snippet to your theme's functions.php file to load the required TinyM...
0 644 posted 12 years ago by f6design
Add this to your Wordpress theme's functions.php file. It allows you to move the 'featured image' upload/select box from the admin sidebar to another position on the page, to give it more prominence.
0 774 posted 12 years ago by f6design
I've yet to work on a WordPress site where at least once post wasn't copied from Microsoft Word, producing a mess of inline tags and awful markup. This helps prevent that, just a little.
0 586 posted 12 years ago by travishines
Custom post page name
0 668 posted 12 years ago by hernanvionnet
0 498 posted 12 years ago by xcsteve99
Send an email to all registered users when a post is published, for wordpress 3.1+
0 664 posted 12 years ago by eniris
Add this to your functions.php file
0 731 posted 12 years ago by xcsteve99
Just pop this in your IMG tags
2 766 posted 12 years ago by xcsteve99
OH MY GOD - ok so this solved a few problems... use this instead of just <body> and you have all the tags you could ever want for applying your css.
0 369 posted 12 years ago by randycaruso
If you would like to insert a cForms form into your WordPress website without using the TinyMCE or Widget function, you can do so by inserting this code in your template. Replace ‘Default’ with the name given to your form.
0 907 posted 12 years ago by albertpak98
A custom breadcrumb function for WordPress that I created for a client. You can pass 2 arguments, the first being the text you want to display in front of the breadcrumb and the second is to hide the home item in the breadcrumb It will give eac...
1 606 posted 12 years ago by krike
created by Adi Dragus
0 452 posted 12 years ago by innerstorm
Returns Wordpress categories as a hierarchical object (i.e. categories with subcategories)
0 424 posted 12 years ago by adamturtle
The admin pages listing the site’s posts and pages come with various text columns (title, tags, categories, author and so on). In order to see what the featured images are, you have to visit each post or page individually. What I will show here, is...
0 736 posted 12 years ago by i-am-andy
Only show content if Custom Field exists
0 754 posted 12 years ago by i-am-andy
Add or Change Content in the Featured Image Meta Box Posted on March 21, 2011 Perhaps you need to provide a little extra instruction about the Featured Image meta box. It doesn’t take much to add your own text to that box:
0 770 posted 12 years ago by i-am-andy
Link to the current theme / template url for use in wordpress template.
0 644 posted 12 years ago by carouselcreative
Just insert any category id into the argument and it will return the top level category object. e.g: print_r( get_top_level_category('INSERT CATEGORY ID HERE') );
0 815 posted 12 years ago by djmosc
1 ... 8 9 10 11 12 ... 43